Browse Source

Fix unequip of the two-handed weapons and hair accessories.

_DS_ 15 năm trước cách đây
mục cha
commit
60358a2683

+ 12 - 0
L2_GameServer/java/com/l2jserver/gameserver/model/itemcontainer/Inventory.java

@@ -1198,6 +1198,18 @@ public abstract class Inventory extends ItemContainer
 	 */
 	public L2ItemInstance unEquipItemInSlot(int pdollSlot)
 	{
+		switch (pdollSlot)
+		{
+			case PAPERDOLL_HAIRALL:
+				setPaperdollItem(PAPERDOLL_HAIR, null);
+				setPaperdollItem(PAPERDOLL_HAIR2, null);
+				break;
+			case PAPERDOLL_LRHAND:
+				setPaperdollItem(PAPERDOLL_LHAND, null);
+				setPaperdollItem(PAPERDOLL_RHAND, null);
+				break;
+		}
+
 		return setPaperdollItem(pdollSlot, null);
 	}