java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java
+import com.l2jserver.gameserver.datatables.ArmorSetsTable;
import com.l2jserver.gameserver.datatables.ClanTable;
@@ -7458,7 +7482,169 @@
/** Special hero aura values */
+ private boolean isHero = false;
+ public void setHeroAura (boolean heroAura)
+ {
+ isHero = heroAura;
+ }
@@ -7458,7 +7482,169 @@
checkPetInvItems();
}
+
+ public void checkForHeroAura()
+ {
+
+ boolean getHeroAura = false;
+ try
+ {
+ if (
+ ArmorSetsTable.getInstance().getSet(Armor id).isEnchanted(4, this)
+ || ArmorSetsTable.getInstance().getSet(Armorid).isEnchanted(4, this)
+ || ArmorSetsTable.getInstance().getSet(Armorid).isEnchanted(4, this)
+ || ArmorSetsTable.getInstance().getSet(Armorid).isEnchanted(4, this)
+ || ArmorSetsTable.getInstance().getSet(Armorid).isEnchanted(4, this)
+ || ArmorSetsTable.getInstance().getSet(Armorid).isEnchanted(4, this)
+ || ArmorSetsTable.getInstance().getSet(Armorid).isEnchanted(4, this)
+ || ArmorSetsTable.getInstance().getSet(Armorid).isEnchanted(4, this)
+ || ArmorSetsTable.getInstance().getSet(Armorid).isEnchanted(4, this)
+ || ArmorSetsTable.getInstance().getSet(Armorid).isEnchanted(4, this)
+ || ArmorSetsTable.getInstance().getSet(Armorid).isEnchanted(4, this)
+ || ArmorSetsTable.getInstance().getSet(Armorid).isEnchanted(4, this)
+ )
+ {
+ getHeroAura = true;
+ }
+ }
+ catch (Exception e)
+ {
+ _log.log(Level.WARNING,"Armor exception message: " + e.getMessage(),e);
+
+ }
+
+ if (getHeroAura)
+ {
+ setHeroAura(true);
+ }
+ else
+ {
+ setHeroAura(false);
+ }
+ }
+
+
+
+ /**
* Restore recipe book data for this L2PcInstance.
*/
private void restoreRecipeBook(boolean loadCommon)
java/com/l2jserver/gameserver/model/L2ArmorSet.java
return true;
}
+
+
+ public boolean isEnchanted(int enchantLevel, L2PcInstance player)
+ {
+ if (!containAll(player))
+ return false;
+
+ Inventory inv = player.getInventory();
+
+ L2ItemInstance chestItem = inv.getPaperdollItem(Inventory.PAPERDOLL_CHEST);
+ L2ItemInstance legsItem = inv.getPaperdollItem(Inventory.PAPERDOLL_LEGS);
+ L2ItemInstance headItem = inv.getPaperdollItem(Inventory.PAPERDOLL_HEAD);
+ L2ItemInstance glovesItem = inv.getPaperdollItem(Inventory.PAPERDOLL_GLOVES);
+ L2ItemInstance feetItem = inv.getPaperdollItem(Inventory.PAPERDOLL_FEET);
+
+ if (chestItem == null || chestItem.getEnchantLevel() < enchantLevel)
+ return false;
+ if (_legs != 0 && (legsItem == null || legsItem.getEnchantLevel() < enchantLevel))
+ return false;
+ if (_gloves != 0 && (glovesItem == null || glovesItem.getEnchantLevel() < enchantLevel))
+ return false;
+ if (_head != 0 && (headItem == null || headItem.getEnchantLevel() < enchantLevel))
+ return false;
+ if (_feet != 0 && (feetItem == null || feetItem.getEnchantLevel() < enchantLevel))
+ return false;
+
+ return true;
+ }
}
java/com/l2jserver/gameserver/model/itemcontainer/Inventory.jav
_log.warning("Inventory.ArmorSetListener: Incorrect skill: "+armorSet.getEnchant6skillId()+".");
}
}
+ player.checkForHeroAura();
}
}
else if (armorSet.containShield(item.getItemId()))
if (remove)
{
+ player.checkForHeroAura();
if (skills != null)
{
for (String skillInfo : skills)
hello pedes. ekane ena code pou otan pas olo to set +4 8a exeis hero aura. mporeite na diale3ete se pia armor 8a ginete auta... px an exete balei mia custom armor mporeite na parete to id tis kai na balete na ginete se auth... pws???
|| ArmorSetsTable.getInstance().getSet(Armorid).isEnchanted(4, this) opou armorid-> bazete to id tis armor... kai opou -> isenchanted(4 bazete sta posa 8elete na dinei heroaura. prepei na exete ola ta set +x.
credits To Me AbSoLuTePoWeR.