Thank you for your report.
Since none reported this on the private version I wil share you my fix.
Index: java/org/l2jmobius/gameserver/engines/DocumentItem.java
===================================================================
--- java/org/l2jmobius/gameserver/engines/DocumentItem.java (revision 7034)
+++ java/org/l2jmobius/gameserver/engines/DocumentItem.java (working copy)
@@ -176,6 +176,7 @@
if (className.equals("Weapon"))
{
+ int bodypart = _slots.get(_currentItem.set.getString("bodypart"));
_currentItem.type = _weaponTypes.get(_currentItem.set.getString("weapon_type"));
// lets see if this is a shield
@@ -218,14 +219,16 @@
}
}
- _currentItem.set.set("bodypart", Item.SLOT_R_HAND);
+ bodypart = Item.SLOT_R_HAND;
}
+
+ _currentItem.set.set("bodypart", bodypart);
}
else if (className.equals("Armor"))
{
_currentItem.type = _armorTypes.get(_currentItem.set.getString("armor_type"));
- final int bodypart = _slots.get(_currentItem.set.getString("bodypart"));
+ int bodypart = _slots.get(_currentItem.set.getString("bodypart"));
if ((bodypart == Item.SLOT_NECK) || (bodypart == Item.SLOT_HAIR) || (bodypart == Item.SLOT_FACE) || (bodypart == Item.SLOT_DHAIR) || ((bodypart & Item.SLOT_L_EAR) != 0) || ((bodypart & Item.SLOT_L_FINGER) != 0))
{
_currentItem.set.set("type1", Item.TYPE1_WEAPON_RING_EARRING_NECKLACE);
@@ -265,8 +268,10 @@
}
}
- _currentItem.set.set("bodypart", Item.SLOT_CHEST);
+ bodypart = Item.SLOT_CHEST;
}
+
+ _currentItem.set.set("bodypart", bodypart);
}
else
{
Index: java/org/l2jmobius/gameserver/model/items/Item.java
===================================================================
--- java/org/l2jmobius/gameserver/model/items/Item.java (revision 7034)
+++ java/org/l2jmobius/gameserver/model/items/Item.java (working copy)
@@ -170,6 +170,7 @@
_weight = set.getInt("weight", 0);
_crystallizable = set.getBoolean("crystallizable", false);
_stackable = set.getBoolean("stackable", false);
+
switch (set.getString("crystal_type", ""))
{
case "d":
@@ -203,133 +204,9 @@
break;
}
}
+
_duration = set.getInt("duration", -1);
- switch (set.getString("bodypart", ""))
- {
- case "chest":
- {
- _bodyPart = SLOT_CHEST;
- break;
- }
- case "fullarmor":
- {
- _bodyPart = SLOT_FULL_ARMOR;
- break;
- }
- case "head":
- {
- _bodyPart = SLOT_HEAD;
- break;
- }
- case "hair":
- {
- _bodyPart = SLOT_HAIR;
- break;
- }
- case "face":
- {
- _bodyPart = SLOT_FACE;
- break;
- }
- case "dhair":
- {
- _bodyPart = SLOT_DHAIR;
- break;
- }
- case "underwear":
- {
- _bodyPart = SLOT_UNDERWEAR;
- break;
- }
- case "back":
- {
- _bodyPart = SLOT_BACK;
- break;
- }
- case "neck":
- {
- _bodyPart = SLOT_NECK;
- break;
- }
- case "legs":
- {
- _bodyPart = SLOT_LEGS;
- break;
- }
- case "feet":
- {
- _bodyPart = SLOT_FEET;
- break;
- }
- case "gloves":
- {
- _bodyPart = SLOT_GLOVES;
- break;
- }
- case "chest,legs":
- {
- _bodyPart = SLOT_CHEST | SLOT_LEGS;
- break;
- }
- case "rhand":
- {
- _bodyPart = SLOT_R_HAND;
- break;
- }
- case "lhand":
- {
- _bodyPart = SLOT_L_HAND;
- break;
- }
- case "lrhand":
- {
- _bodyPart = SLOT_LR_HAND;
- break;
- }
- case "rear,lear":
- {
- _bodyPart = SLOT_R_EAR | SLOT_L_EAR;
- break;
- }
- case "rfinger,lfinger":
- {
- _bodyPart = SLOT_R_FINGER | SLOT_L_FINGER;
- break;
- }
- case "wolf":
- {
- _bodyPart = SLOT_WOLF;
- break;
- }
- case "hatchling":
- {
- _bodyPart = SLOT_HATCHLING;
- break;
- }
- case "strider":
- {
- _bodyPart = SLOT_STRIDER;
- break;
- }
- case "babypet":
- {
- _bodyPart = SLOT_BABYPET;
- break;
- }
- default: // "none"
- {
- if (_name.contains(" Arrow") || _name.contains(" Lure")) // Tempfix for invisible equipped consumables.
- {
- _bodyPart = Item.SLOT_L_HAND; // TODO: Should be done on XML.
- }
- else
- {
- _bodyPart = SLOT_NONE;
- }
- break;
- }
- }
-
+ _bodyPart = set.getInt("bodypart", SLOT_NONE);
_referencePrice = set.getInt("price", 0);
_crystalCount = set.getInt("crystal_count", 0);
_sellable = set.getBoolean("sellable", true);
It also fixes the invisible equipped consumables.