L2J Revision 5376:
L2JDP Revision 8841:
Hi to everyone.
I would like to ask :
Option value element_enabled, which is used in xml files, in order to enable, attribute addition on specific items, can it be overrided through a specific java class file in repository?
If yes, which is this file?
Thanks for your time.
Element_enabled value
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
- nonom
- L2j Veteran
- Posts: 649
- Joined: Wed Mar 11, 2009 10:34 pm
- Location: Magmeld
Re: Element_enabled value
Depending what do you mean with "attribute addition".
Take a look into the L2Item class
com.l2jserver.gameserver.model.items.L2Item.java
com.l2jserver.gameserver.model.items.instance.L2ItemInstance.java
The elements are added when the following packet is requested:
com.l2jserver.gameserver.network.clientpackets.RequestExEnchantItemAttribute.java the element is added
Maybe could define a new attribute to decrease/increase whatever you want 
Take a look into the L2Item class
com.l2jserver.gameserver.model.items.L2Item.java
com.l2jserver.gameserver.model.items.instance.L2ItemInstance.java
Code: Select all
_elementable = set.getBool("element_enabled", false);
com.l2jserver.gameserver.network.clientpackets.RequestExEnchantItemAttribute.java the element is added
Code: Select all
L2ItemInstance item = player.getInventory().getItemByObjectId(_objectId);L2ItemInstance stone = player.getActiveEnchantAttrItem();if (item == null || stone == null){ player.setActiveEnchantAttrItem(null); return;}if (!item.isElementable()){ player.sendPacket(SystemMessageId.ELEMENTAL_ENHANCE_REQUIREMENT_NOT_SUFFICIENT); player.setActiveEnchantAttrItem(null); return;} [...] item.setElementAttr(elementToAdd, newPower);if (item.isEquipped()) item.updateElementAttrBonus(player); // send packetsInventoryUpdate iu = new InventoryUpdate();iu.addModifiedItem(item);player.sendPacket(iu);
