From 914c9efe6c18a6a809861277b7f8421006ce0811 Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Sun, 24 Jul 2022 08:47:29 +0000 Subject: [PATCH] Pet include LR hand to weapon getter method. Contributed by darkillust. --- .../java/org/l2jmobius/gameserver/model/actor/instance/Pet.java | 2 +- .../java/org/l2jmobius/gameserver/model/actor/instance/Pet.java | 2 +- .../java/org/l2jmobius/gameserver/model/actor/instance/Pet.java | 2 +- .../java/org/l2jmobius/gameserver/model/actor/instance/Pet.java | 2 +- .../java/org/l2jmobius/gameserver/model/actor/instance/Pet.java | 2 +- .../gameserver/network/clientpackets/pet/ExPetEquipItem.java | 2 +- .../java/org/l2jmobius/gameserver/model/actor/instance/Pet.java | 2 +- .../gameserver/network/clientpackets/pet/ExPetEquipItem.java | 2 +- .../java/org/l2jmobius/gameserver/model/actor/instance/Pet.java | 2 +- .../gameserver/network/clientpackets/pet/ExPetEquipItem.java | 2 +- .../java/org/l2jmobius/gameserver/model/actor/instance/Pet.java | 2 +- .../gameserver/network/clientpackets/pet/ExPetEquipItem.java | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/instance/Pet.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/instance/Pet.java index 5ec82b769e..fcb5b98d0f 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/instance/Pet.java +++ b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/instance/Pet.java @@ -338,7 +338,7 @@ public class Pet extends Summon { for (Item item : _inventory.getItems()) { - if ((item.getItemLocation() == ItemLocation.PET_EQUIP) && (item.getTemplate().getBodyPart() == ItemTemplate.SLOT_R_HAND)) + if ((item.getItemLocation() == ItemLocation.PET_EQUIP) && ((item.getTemplate().getBodyPart() == ItemTemplate.SLOT_R_HAND) || (item.getTemplate().getBodyPart() == ItemTemplate.SLOT_LR_HAND))) { return item; } diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/instance/Pet.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/instance/Pet.java index 5ec82b769e..fcb5b98d0f 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/instance/Pet.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/instance/Pet.java @@ -338,7 +338,7 @@ public class Pet extends Summon { for (Item item : _inventory.getItems()) { - if ((item.getItemLocation() == ItemLocation.PET_EQUIP) && (item.getTemplate().getBodyPart() == ItemTemplate.SLOT_R_HAND)) + if ((item.getItemLocation() == ItemLocation.PET_EQUIP) && ((item.getTemplate().getBodyPart() == ItemTemplate.SLOT_R_HAND) || (item.getTemplate().getBodyPart() == ItemTemplate.SLOT_LR_HAND))) { return item; } diff --git a/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/model/actor/instance/Pet.java b/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/model/actor/instance/Pet.java index 0c0a18cb81..c24921124c 100644 --- a/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/model/actor/instance/Pet.java +++ b/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/model/actor/instance/Pet.java @@ -338,7 +338,7 @@ public class Pet extends Summon { for (Item item : _inventory.getItems()) { - if ((item.getItemLocation() == ItemLocation.PET_EQUIP) && (item.getTemplate().getBodyPart() == ItemTemplate.SLOT_R_HAND)) + if ((item.getItemLocation() == ItemLocation.PET_EQUIP) && ((item.getTemplate().getBodyPart() == ItemTemplate.SLOT_R_HAND) || (item.getTemplate().getBodyPart() == ItemTemplate.SLOT_LR_HAND))) { return item; } diff --git a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/actor/instance/Pet.java b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/actor/instance/Pet.java index 0c0a18cb81..c24921124c 100644 --- a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/actor/instance/Pet.java +++ b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/actor/instance/Pet.java @@ -338,7 +338,7 @@ public class Pet extends Summon { for (Item item : _inventory.getItems()) { - if ((item.getItemLocation() == ItemLocation.PET_EQUIP) && (item.getTemplate().getBodyPart() == ItemTemplate.SLOT_R_HAND)) + if ((item.getItemLocation() == ItemLocation.PET_EQUIP) && ((item.getTemplate().getBodyPart() == ItemTemplate.SLOT_R_HAND) || (item.getTemplate().getBodyPart() == ItemTemplate.SLOT_LR_HAND))) { return item; } diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/instance/Pet.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/instance/Pet.java index 0ac120329e..9c10d8f166 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/instance/Pet.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/instance/Pet.java @@ -459,7 +459,7 @@ public class Pet extends Summon { for (Item item : _inventory.getItems()) { - if ((item.getItemLocation() == ItemLocation.PET_EQUIP) && (item.getTemplate().getBodyPart() == ItemTemplate.SLOT_R_HAND)) + if ((item.getItemLocation() == ItemLocation.PET_EQUIP) && ((item.getTemplate().getBodyPart() == ItemTemplate.SLOT_R_HAND) || (item.getTemplate().getBodyPart() == ItemTemplate.SLOT_LR_HAND))) { return item; } diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetEquipItem.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetEquipItem.java index 780cc168fe..72f1f9a649 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetEquipItem.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetEquipItem.java @@ -73,11 +73,11 @@ public class ExPetEquipItem implements IClientIncomingPacket } final Item item = player.getInventory().getItemByObjectId(_objectId); - if (item == null) { return; } + // No UseItem is allowed while the player is in special conditions if (player.hasBlockActions() || player.isControlBlocked() || player.isAlikeDead()) { diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/instance/Pet.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/instance/Pet.java index 11237890c1..2cdf05fcd1 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/instance/Pet.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/instance/Pet.java @@ -459,7 +459,7 @@ public class Pet extends Summon { for (Item item : _inventory.getItems()) { - if ((item.getItemLocation() == ItemLocation.PET_EQUIP) && (item.getTemplate().getBodyPart() == ItemTemplate.SLOT_R_HAND)) + if ((item.getItemLocation() == ItemLocation.PET_EQUIP) && ((item.getTemplate().getBodyPart() == ItemTemplate.SLOT_R_HAND) || (item.getTemplate().getBodyPart() == ItemTemplate.SLOT_LR_HAND))) { return item; } diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetEquipItem.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetEquipItem.java index 780cc168fe..72f1f9a649 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetEquipItem.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetEquipItem.java @@ -73,11 +73,11 @@ public class ExPetEquipItem implements IClientIncomingPacket } final Item item = player.getInventory().getItemByObjectId(_objectId); - if (item == null) { return; } + // No UseItem is allowed while the player is in special conditions if (player.hasBlockActions() || player.isControlBlocked() || player.isAlikeDead()) { diff --git a/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/model/actor/instance/Pet.java b/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/model/actor/instance/Pet.java index 853c319709..94cc2b3fa6 100644 --- a/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/model/actor/instance/Pet.java +++ b/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/model/actor/instance/Pet.java @@ -459,7 +459,7 @@ public class Pet extends Summon { for (Item item : _inventory.getItems()) { - if ((item.getItemLocation() == ItemLocation.PET_EQUIP) && (item.getTemplate().getBodyPart() == ItemTemplate.SLOT_R_HAND)) + if ((item.getItemLocation() == ItemLocation.PET_EQUIP) && ((item.getTemplate().getBodyPart() == ItemTemplate.SLOT_R_HAND) || (item.getTemplate().getBodyPart() == ItemTemplate.SLOT_LR_HAND))) { return item; } diff --git a/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetEquipItem.java b/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetEquipItem.java index 780cc168fe..72f1f9a649 100644 --- a/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetEquipItem.java +++ b/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetEquipItem.java @@ -73,11 +73,11 @@ public class ExPetEquipItem implements IClientIncomingPacket } final Item item = player.getInventory().getItemByObjectId(_objectId); - if (item == null) { return; } + // No UseItem is allowed while the player is in special conditions if (player.hasBlockActions() || player.isControlBlocked() || player.isAlikeDead()) { diff --git a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/actor/instance/Pet.java b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/actor/instance/Pet.java index 853c319709..94cc2b3fa6 100644 --- a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/actor/instance/Pet.java +++ b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/actor/instance/Pet.java @@ -459,7 +459,7 @@ public class Pet extends Summon { for (Item item : _inventory.getItems()) { - if ((item.getItemLocation() == ItemLocation.PET_EQUIP) && (item.getTemplate().getBodyPart() == ItemTemplate.SLOT_R_HAND)) + if ((item.getItemLocation() == ItemLocation.PET_EQUIP) && ((item.getTemplate().getBodyPart() == ItemTemplate.SLOT_R_HAND) || (item.getTemplate().getBodyPart() == ItemTemplate.SLOT_LR_HAND))) { return item; } diff --git a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetEquipItem.java b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetEquipItem.java index 780cc168fe..72f1f9a649 100644 --- a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetEquipItem.java +++ b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/network/clientpackets/pet/ExPetEquipItem.java @@ -73,11 +73,11 @@ public class ExPetEquipItem implements IClientIncomingPacket } final Item item = player.getInventory().getItemByObjectId(_objectId); - if (item == null) { return; } + // No UseItem is allowed while the player is in special conditions if (player.hasBlockActions() || player.isControlBlocked() || player.isAlikeDead()) {