Element_enabled value

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
User avatar
Asmodaius
Posts: 170
Joined: Sun Jul 16, 2006 9:43 am

Element_enabled value

Post by Asmodaius »

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.
User avatar
nonom
L2j Veteran
L2j Veteran
Posts: 649
Joined: Wed Mar 11, 2009 10:34 pm
Location: Magmeld

Re: Element_enabled value

Post by nonom »

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

Code: Select all

 _elementable = set.getBool("element_enabled", false);
The elements are added when the following packet is requested:
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); 
Maybe could define a new attribute to decrease/increase whatever you want :P
Image
"There are three kinds of people in this world, those who can count and those who can't"
Post Reply