AbsolutePower Posted June 16, 2011 Posted June 16, 2011 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.
`NeverMore Posted June 16, 2011 Posted June 16, 2011 hmmm kalo fenete dn 3erw.... isws to dokimasw ... Thanks for Share
Kяaσh Posted June 16, 2011 Posted June 16, 2011 + public void setHeroAura (boolean heroAura) + { + isHero = heroAura; + return; + } den xreiazesai to return.
pipiou21 Posted June 18, 2011 Posted June 18, 2011 Btw, wraio :)... Evala ena allo effect anti gia to hero, thanks ^^!
bobzih Posted June 20, 2011 Posted June 20, 2011 Do not quite understand, can you explain how it works?
AbsolutePower Posted June 20, 2011 Author Posted June 20, 2011 Do not quite understand, can you explain how it works? you will be able to use this effect when your set is +4...(you will get Hero Aura) (you can change it --> || ArmorSetsTable.getInstance().getSet(Armorid).isEnchanted(4, this) where armorid you can put your set...) where isEnchanted(4, this) <- you can change the enchant rate.
pipiou21 Posted June 20, 2011 Posted June 20, 2011 you will be able to use this effect when your set is +4...(you will get Hero Aura) (you can change it --> || ArmorSetsTable.getInstance().getSet(Armorid).isEnchanted(4, this) where armorid you can put your set...) where isEnchanted(4, this) <- you can change the enchant rate. "Armorid" is the chest of the armorset and that "4" is the value of enchant that the whole armor must be (helm, chest, legs, gloves, boots) to get hero aura. (You will need to add only the chest of the armorset and now the whole armor one-by-one items...)
pipiou21 Posted June 24, 2011 Posted June 24, 2011 for Interlude? Can be used for interlude with some small changes (even without them).
xCh4osRoXaSx Posted July 2, 2012 Posted July 2, 2012 Kalo share an kai oxi kati idiaitero ;) btw kali douleia sinexise !
ReaLlDŦñ Posted August 1, 2012 Posted August 1, 2012 apo mia apopsi kalo fenete alla apo tin ali bori na fenete ligo mlkia an exeis 100++ atoma gt 8a einai sxedon oloi hero
L2KingWorld Posted December 22, 2012 Posted December 22, 2012 file rikse mia matia ke pes ti mpori na fteh...
l22expert Posted December 22, 2012 Posted December 22, 2012 kalo share ama work alla tou pediou L2KingWorld bgazi error L2KingWorld mipos den to perases oipos lei kai den anaferi se ty project to bazoume
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now