From c6b043a3f244e60c987a05b939492477c8297609 Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Sat, 24 Apr 2021 23:48:46 +0000 Subject: [PATCH] Additional unequip check for shields. --- .../l2jmobius/gameserver/model/itemcontainer/Inventory.java | 5 +++++ .../l2jmobius/gameserver/model/itemcontainer/Inventory.java | 5 +++++ .../l2jmobius/gameserver/model/itemcontainer/Inventory.java | 5 +++++ .../l2jmobius/gameserver/model/itemcontainer/Inventory.java | 5 +++++ 4 files changed, 20 insertions(+) diff --git a/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java index e487411b1b..cc9348a8ec 100644 --- a/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java +++ b/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java @@ -1967,6 +1967,11 @@ public abstract class Inventory extends ItemContainer { setPaperdollItem(PAPERDOLL_RHAND, null); } + final ItemInstance lh = getPaperdollItem(PAPERDOLL_LHAND); + if ((lh != null) && lh.isArmor() && (lh.getArmorItem().getItemType() == ArmorType.SHIELD)) + { + setPaperdollItem(PAPERDOLL_LHAND, null); + } setPaperdollItem(PAPERDOLL_RHAND, item); } else if (targetSlot == Item.SLOT_L_HAND) diff --git a/L2J_Mobius_9.0_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_9.0_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java index e487411b1b..cc9348a8ec 100644 --- a/L2J_Mobius_9.0_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java +++ b/L2J_Mobius_9.0_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java @@ -1967,6 +1967,11 @@ public abstract class Inventory extends ItemContainer { setPaperdollItem(PAPERDOLL_RHAND, null); } + final ItemInstance lh = getPaperdollItem(PAPERDOLL_LHAND); + if ((lh != null) && lh.isArmor() && (lh.getArmorItem().getItemType() == ArmorType.SHIELD)) + { + setPaperdollItem(PAPERDOLL_LHAND, null); + } setPaperdollItem(PAPERDOLL_RHAND, item); } else if (targetSlot == Item.SLOT_L_HAND) diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java index 4cb266ff67..2e30f87de3 100644 --- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java @@ -2095,6 +2095,11 @@ public abstract class Inventory extends ItemContainer { setPaperdollItem(PAPERDOLL_RHAND, null); } + final ItemInstance lh = getPaperdollItem(PAPERDOLL_LHAND); + if ((lh != null) && lh.isArmor() && (lh.getArmorItem().getItemType() == ArmorType.SHIELD)) + { + setPaperdollItem(PAPERDOLL_LHAND, null); + } setPaperdollItem(PAPERDOLL_RHAND, item); } else if (targetSlot == Item.SLOT_L_HAND) diff --git a/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java index 740b63786f..c434d53aa3 100644 --- a/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java +++ b/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java @@ -2104,6 +2104,11 @@ public abstract class Inventory extends ItemContainer { setPaperdollItem(PAPERDOLL_RHAND, null); } + final ItemInstance lh = getPaperdollItem(PAPERDOLL_LHAND); + if ((lh != null) && lh.isArmor() && (lh.getArmorItem().getItemType() == ArmorType.SHIELD)) + { + setPaperdollItem(PAPERDOLL_LHAND, null); + } setPaperdollItem(PAPERDOLL_RHAND, item); } else if (targetSlot == Item.SLOT_L_HAND)