From 2e3dd3d853d2e8d4f7d3d63266304d070ef6f9d6 Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Sat, 21 Aug 2021 23:54:44 +0000 Subject: [PATCH] Do not unequip bracelets, talismans or artifacts on class change. --- .../gameserver/model/itemcontainer/Inventory.java | 7 +++++++ .../gameserver/model/itemcontainer/Inventory.java | 7 +++++++ .../gameserver/model/itemcontainer/Inventory.java | 7 +++++++ .../gameserver/model/itemcontainer/Inventory.java | 7 +++++++ .../gameserver/model/itemcontainer/Inventory.java | 7 +++++++ .../gameserver/model/itemcontainer/Inventory.java | 7 +++++++ .../gameserver/model/itemcontainer/Inventory.java | 7 +++++++ .../gameserver/model/itemcontainer/Inventory.java | 7 +++++++ .../gameserver/model/itemcontainer/Inventory.java | 7 +++++++ .../gameserver/model/itemcontainer/Inventory.java | 7 +++++++ .../gameserver/model/itemcontainer/Inventory.java | 7 +++++++ .../gameserver/model/itemcontainer/Inventory.java | 7 +++++++ 12 files changed, 84 insertions(+) diff --git a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java index 5af186bd0a..8f9b6ae8bf 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java +++ b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java @@ -2486,6 +2486,13 @@ public abstract class Inventory extends ItemContainer } slot = item.getLocationSlot(); + + // Do not unequip bracelets, talismans or artifacts. + if ((slot >= PAPERDOLL_LBRACELET) && (slot <= PAPERDOLL_ARTIFACT21)) + { + continue; + } + for (PaperdollListener listener : _paperdollListeners) { if (listener == null) diff --git a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java index 5af186bd0a..8f9b6ae8bf 100644 --- a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java +++ b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java @@ -2486,6 +2486,13 @@ public abstract class Inventory extends ItemContainer } slot = item.getLocationSlot(); + + // Do not unequip bracelets, talismans or artifacts. + if ((slot >= PAPERDOLL_LBRACELET) && (slot <= PAPERDOLL_ARTIFACT21)) + { + continue; + } + for (PaperdollListener listener : _paperdollListeners) { if (listener == null) diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java index 1c7559aa30..4a3a17670e 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java @@ -2471,6 +2471,13 @@ public abstract class Inventory extends ItemContainer } slot = item.getLocationSlot(); + + // Do not unequip bracelets, talismans or artifacts. + if ((slot >= PAPERDOLL_LBRACELET) && (slot <= PAPERDOLL_ARTIFACT21)) + { + continue; + } + for (PaperdollListener listener : _paperdollListeners) { if (listener == null) 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 ff605a605f..fb920b4375 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 @@ -2453,6 +2453,13 @@ public abstract class Inventory extends ItemContainer } slot = item.getLocationSlot(); + + // Do not unequip bracelets, talismans or artifacts. + if ((slot >= PAPERDOLL_LBRACELET) && (slot <= PAPERDOLL_ARTIFACT21)) + { + continue; + } + for (PaperdollListener listener : _paperdollListeners) { if (listener == null) 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 ff605a605f..fb920b4375 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 @@ -2453,6 +2453,13 @@ public abstract class Inventory extends ItemContainer } slot = item.getLocationSlot(); + + // Do not unequip bracelets, talismans or artifacts. + if ((slot >= PAPERDOLL_LBRACELET) && (slot <= PAPERDOLL_ARTIFACT21)) + { + continue; + } + for (PaperdollListener listener : _paperdollListeners) { if (listener == null) diff --git a/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java index ff605a605f..fb920b4375 100644 --- a/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java +++ b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java @@ -2453,6 +2453,13 @@ public abstract class Inventory extends ItemContainer } slot = item.getLocationSlot(); + + // Do not unequip bracelets, talismans or artifacts. + if ((slot >= PAPERDOLL_LBRACELET) && (slot <= PAPERDOLL_ARTIFACT21)) + { + continue; + } + for (PaperdollListener listener : _paperdollListeners) { if (listener == null) diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java index d754529c05..095a4c93aa 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java @@ -2488,6 +2488,13 @@ public abstract class Inventory extends ItemContainer } slot = item.getLocationSlot(); + + // Do not unequip bracelets, talismans or artifacts. + if ((slot >= PAPERDOLL_LBRACELET) && (slot <= PAPERDOLL_ARTIFACT21)) + { + continue; + } + for (PaperdollListener listener : _paperdollListeners) { if (listener == null) diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java index d754529c05..095a4c93aa 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java @@ -2488,6 +2488,13 @@ public abstract class Inventory extends ItemContainer } slot = item.getLocationSlot(); + + // Do not unequip bracelets, talismans or artifacts. + if ((slot >= PAPERDOLL_LBRACELET) && (slot <= PAPERDOLL_ARTIFACT21)) + { + continue; + } + for (PaperdollListener listener : _paperdollListeners) { if (listener == null) diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java index baf97da27b..71f4203c9c 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java @@ -2473,6 +2473,13 @@ public abstract class Inventory extends ItemContainer } slot = item.getLocationSlot(); + + // Do not unequip bracelets, talismans or artifacts. + if ((slot >= PAPERDOLL_LBRACELET) && (slot <= PAPERDOLL_ARTIFACT21)) + { + continue; + } + for (PaperdollListener listener : _paperdollListeners) { if (listener == null) 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 296e24e7b8..873787aa35 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 @@ -2581,6 +2581,13 @@ public abstract class Inventory extends ItemContainer } slot = item.getLocationSlot(); + + // Do not unequip bracelets, talismans or artifacts. + if ((slot >= PAPERDOLL_LBRACELET) && (slot <= PAPERDOLL_ARTIFACT21)) + { + continue; + } + for (PaperdollListener listener : _paperdollListeners) { if (listener == null) 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 663277a6a9..b8f4291948 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 @@ -2611,6 +2611,13 @@ public abstract class Inventory extends ItemContainer } slot = item.getLocationSlot(); + + // Do not unequip bracelets, talismans or artifacts. + if ((slot >= PAPERDOLL_LBRACELET) && (slot <= PAPERDOLL_ARTIFACT21)) + { + continue; + } + for (PaperdollListener listener : _paperdollListeners) { if (listener == null) diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java index 663277a6a9..b8f4291948 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java @@ -2611,6 +2611,13 @@ public abstract class Inventory extends ItemContainer } slot = item.getLocationSlot(); + + // Do not unequip bracelets, talismans or artifacts. + if ((slot >= PAPERDOLL_LBRACELET) && (slot <= PAPERDOLL_ARTIFACT21)) + { + continue; + } + for (PaperdollListener listener : _paperdollListeners) { if (listener == null)