From dbfdd34850728d09ea56b96e2c2a50cbdf77fa4a Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Tue, 7 May 2019 14:54:14 +0000 Subject: [PATCH] Apply visual set skills only when a fixed stone was used. --- .../model/itemcontainer/Inventory.java | 16 ++++++++++++++++ .../model/items/instance/ItemInstance.java | 4 +++- .../model/itemcontainer/Inventory.java | 7 +++++-- .../model/itemcontainer/Inventory.java | 7 +++++-- .../model/itemcontainer/Inventory.java | 7 +++++-- .../model/itemcontainer/Inventory.java | 7 +++++-- .../model/itemcontainer/Inventory.java | 7 +++++-- .../model/itemcontainer/Inventory.java | 7 +++++-- .../model/itemcontainer/Inventory.java | 7 +++++-- .../model/itemcontainer/Inventory.java | 7 +++++-- .../model/itemcontainer/Inventory.java | 7 +++++-- .../model/itemcontainer/Inventory.java | 7 +++++-- .../model/itemcontainer/Inventory.java | 7 +++++-- 13 files changed, 74 insertions(+), 23 deletions(-) diff --git a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java index c8ad3f55c0..ef9c5f7ac6 100644 --- a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java +++ b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java @@ -37,6 +37,7 @@ import java.util.stream.Collectors; import org.l2jmobius.Config; import org.l2jmobius.commons.database.DatabaseFactory; import org.l2jmobius.commons.util.CommonUtil; +import org.l2jmobius.gameserver.data.xml.impl.AppearanceItemData; import org.l2jmobius.gameserver.data.xml.impl.ArmorSetsData; import org.l2jmobius.gameserver.datatables.ItemTable; import org.l2jmobius.gameserver.enums.ItemLocation; @@ -50,6 +51,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; import org.l2jmobius.gameserver.model.holders.ArmorsetSkillHolder; import org.l2jmobius.gameserver.model.items.EtcItem; import org.l2jmobius.gameserver.model.items.Item; +import org.l2jmobius.gameserver.model.items.appearance.AppearanceType; import org.l2jmobius.gameserver.model.items.instance.ItemInstance; import org.l2jmobius.gameserver.model.items.type.EtcItemType; import org.l2jmobius.gameserver.model.items.type.ItemType; @@ -394,6 +396,7 @@ public abstract class Inventory extends ItemContainer } final PlayerInstance player = (PlayerInstance) inventory.getOwner(); + final AtomicBoolean update = new AtomicBoolean(); final AtomicBoolean updateTimestamp = new AtomicBoolean(); @@ -487,6 +490,13 @@ public abstract class Inventory extends ItemContainer update = true; } + // Verify and apply visual set + final int itemVisualId = item.getVisualId(); + if ((itemVisualId > 0) && (AppearanceItemData.getInstance().getStone(itemVisualId).getType() == AppearanceType.FIXED) && verifyAndApply(player, item, ItemInstance::getVisualId)) + { + update = true; + } + if (update) { player.sendSkillList(); @@ -610,6 +620,12 @@ public abstract class Inventory extends ItemContainer remove = true; } + // verify and remove visual set bonus + if (verifyAndRemove(player, item, ItemInstance::getVisualId)) + { + remove = true; + } + if (remove) { player.checkItemRestriction(); diff --git a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/items/instance/ItemInstance.java b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/items/instance/ItemInstance.java index 8d9877eb06..619fab7258 100644 --- a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/items/instance/ItemInstance.java +++ b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/items/instance/ItemInstance.java @@ -1529,7 +1529,9 @@ public final class ItemInstance extends WorldObject */ public class ItemDropTask implements Runnable { - private int _x, _y, _z; + private int _x; + private int _y; + private int _z; private final Creature _dropper; private final ItemInstance _itеm; diff --git a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java index 138c61fa82..66ec376a94 100644 --- a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java +++ b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java @@ -37,6 +37,7 @@ import java.util.stream.Collectors; import org.l2jmobius.Config; import org.l2jmobius.commons.database.DatabaseFactory; import org.l2jmobius.commons.util.CommonUtil; +import org.l2jmobius.gameserver.data.xml.impl.AppearanceItemData; import org.l2jmobius.gameserver.data.xml.impl.ArmorSetsData; import org.l2jmobius.gameserver.datatables.ItemTable; import org.l2jmobius.gameserver.enums.ItemLocation; @@ -50,6 +51,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; import org.l2jmobius.gameserver.model.holders.ArmorsetSkillHolder; import org.l2jmobius.gameserver.model.items.EtcItem; import org.l2jmobius.gameserver.model.items.Item; +import org.l2jmobius.gameserver.model.items.appearance.AppearanceType; import org.l2jmobius.gameserver.model.items.instance.ItemInstance; import org.l2jmobius.gameserver.model.items.type.EtcItemType; import org.l2jmobius.gameserver.model.items.type.ItemType; @@ -505,8 +507,9 @@ public abstract class Inventory extends ItemContainer update = true; } - // Very and apply visual set - if (verifyAndApply(player, item, ItemInstance::getVisualId)) + // Verify and apply visual set + final int itemVisualId = item.getVisualId(); + if ((itemVisualId > 0) && (AppearanceItemData.getInstance().getStone(itemVisualId).getType() == AppearanceType.FIXED) && verifyAndApply(player, item, ItemInstance::getVisualId)) { update = true; } diff --git a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java index 138c61fa82..66ec376a94 100644 --- a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java +++ b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java @@ -37,6 +37,7 @@ import java.util.stream.Collectors; import org.l2jmobius.Config; import org.l2jmobius.commons.database.DatabaseFactory; import org.l2jmobius.commons.util.CommonUtil; +import org.l2jmobius.gameserver.data.xml.impl.AppearanceItemData; import org.l2jmobius.gameserver.data.xml.impl.ArmorSetsData; import org.l2jmobius.gameserver.datatables.ItemTable; import org.l2jmobius.gameserver.enums.ItemLocation; @@ -50,6 +51,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; import org.l2jmobius.gameserver.model.holders.ArmorsetSkillHolder; import org.l2jmobius.gameserver.model.items.EtcItem; import org.l2jmobius.gameserver.model.items.Item; +import org.l2jmobius.gameserver.model.items.appearance.AppearanceType; import org.l2jmobius.gameserver.model.items.instance.ItemInstance; import org.l2jmobius.gameserver.model.items.type.EtcItemType; import org.l2jmobius.gameserver.model.items.type.ItemType; @@ -505,8 +507,9 @@ public abstract class Inventory extends ItemContainer update = true; } - // Very and apply visual set - if (verifyAndApply(player, item, ItemInstance::getVisualId)) + // Verify and apply visual set + final int itemVisualId = item.getVisualId(); + if ((itemVisualId > 0) && (AppearanceItemData.getInstance().getStone(itemVisualId).getType() == AppearanceType.FIXED) && verifyAndApply(player, item, ItemInstance::getVisualId)) { update = true; } diff --git a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java index 34350db2d6..b638356ee1 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java @@ -37,6 +37,7 @@ import java.util.stream.Collectors; import org.l2jmobius.Config; import org.l2jmobius.commons.database.DatabaseFactory; import org.l2jmobius.commons.util.CommonUtil; +import org.l2jmobius.gameserver.data.xml.impl.AppearanceItemData; import org.l2jmobius.gameserver.data.xml.impl.ArmorSetsData; import org.l2jmobius.gameserver.datatables.ItemTable; import org.l2jmobius.gameserver.enums.ItemLocation; @@ -50,6 +51,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; import org.l2jmobius.gameserver.model.holders.ArmorsetSkillHolder; import org.l2jmobius.gameserver.model.items.EtcItem; import org.l2jmobius.gameserver.model.items.Item; +import org.l2jmobius.gameserver.model.items.appearance.AppearanceType; import org.l2jmobius.gameserver.model.items.instance.ItemInstance; import org.l2jmobius.gameserver.model.items.type.EtcItemType; import org.l2jmobius.gameserver.model.items.type.ItemType; @@ -505,8 +507,9 @@ public abstract class Inventory extends ItemContainer update = true; } - // Very and apply visual set - if (verifyAndApply(player, item, ItemInstance::getVisualId)) + // Verify and apply visual set + final int itemVisualId = item.getVisualId(); + if ((itemVisualId > 0) && (AppearanceItemData.getInstance().getStone(itemVisualId).getType() == AppearanceType.FIXED) && verifyAndApply(player, item, ItemInstance::getVisualId)) { update = true; } diff --git a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java index 390aef9c53..fa9b1e2599 100644 --- a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java +++ b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java @@ -37,6 +37,7 @@ import java.util.stream.Collectors; import org.l2jmobius.Config; import org.l2jmobius.commons.database.DatabaseFactory; import org.l2jmobius.commons.util.CommonUtil; +import org.l2jmobius.gameserver.data.xml.impl.AppearanceItemData; import org.l2jmobius.gameserver.data.xml.impl.ArmorSetsData; import org.l2jmobius.gameserver.datatables.ItemTable; import org.l2jmobius.gameserver.enums.ItemLocation; @@ -50,6 +51,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; import org.l2jmobius.gameserver.model.holders.ArmorsetSkillHolder; import org.l2jmobius.gameserver.model.items.EtcItem; import org.l2jmobius.gameserver.model.items.Item; +import org.l2jmobius.gameserver.model.items.appearance.AppearanceType; import org.l2jmobius.gameserver.model.items.instance.ItemInstance; import org.l2jmobius.gameserver.model.items.type.EtcItemType; import org.l2jmobius.gameserver.model.items.type.ItemType; @@ -510,8 +512,9 @@ public abstract class Inventory extends ItemContainer update = true; } - // Very and apply visual set - if (verifyAndApply(player, item, ItemInstance::getVisualId)) + // Verify and apply visual set + final int itemVisualId = item.getVisualId(); + if ((itemVisualId > 0) && (AppearanceItemData.getInstance().getStone(itemVisualId).getType() == AppearanceType.FIXED) && verifyAndApply(player, item, ItemInstance::getVisualId)) { update = true; } 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 1127b5c6f6..51d294a50c 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 @@ -37,6 +37,7 @@ import java.util.stream.Collectors; import org.l2jmobius.Config; import org.l2jmobius.commons.database.DatabaseFactory; import org.l2jmobius.commons.util.CommonUtil; +import org.l2jmobius.gameserver.data.xml.impl.AppearanceItemData; import org.l2jmobius.gameserver.data.xml.impl.ArmorSetsData; import org.l2jmobius.gameserver.datatables.ItemTable; import org.l2jmobius.gameserver.enums.ItemLocation; @@ -50,6 +51,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; import org.l2jmobius.gameserver.model.holders.ArmorsetSkillHolder; import org.l2jmobius.gameserver.model.items.EtcItem; import org.l2jmobius.gameserver.model.items.Item; +import org.l2jmobius.gameserver.model.items.appearance.AppearanceType; import org.l2jmobius.gameserver.model.items.instance.ItemInstance; import org.l2jmobius.gameserver.model.items.type.EtcItemType; import org.l2jmobius.gameserver.model.items.type.ItemType; @@ -533,8 +535,9 @@ public abstract class Inventory extends ItemContainer update = true; } - // Very and apply visual set - if (verifyAndApply(player, item, ItemInstance::getVisualId)) + // Verify and apply visual set + final int itemVisualId = item.getVisualId(); + if ((itemVisualId > 0) && (AppearanceItemData.getInstance().getStone(itemVisualId).getType() == AppearanceType.FIXED) && verifyAndApply(player, item, ItemInstance::getVisualId)) { update = true; } 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 1127b5c6f6..51d294a50c 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 @@ -37,6 +37,7 @@ import java.util.stream.Collectors; import org.l2jmobius.Config; import org.l2jmobius.commons.database.DatabaseFactory; import org.l2jmobius.commons.util.CommonUtil; +import org.l2jmobius.gameserver.data.xml.impl.AppearanceItemData; import org.l2jmobius.gameserver.data.xml.impl.ArmorSetsData; import org.l2jmobius.gameserver.datatables.ItemTable; import org.l2jmobius.gameserver.enums.ItemLocation; @@ -50,6 +51,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; import org.l2jmobius.gameserver.model.holders.ArmorsetSkillHolder; import org.l2jmobius.gameserver.model.items.EtcItem; import org.l2jmobius.gameserver.model.items.Item; +import org.l2jmobius.gameserver.model.items.appearance.AppearanceType; import org.l2jmobius.gameserver.model.items.instance.ItemInstance; import org.l2jmobius.gameserver.model.items.type.EtcItemType; import org.l2jmobius.gameserver.model.items.type.ItemType; @@ -533,8 +535,9 @@ public abstract class Inventory extends ItemContainer update = true; } - // Very and apply visual set - if (verifyAndApply(player, item, ItemInstance::getVisualId)) + // Verify and apply visual set + final int itemVisualId = item.getVisualId(); + if ((itemVisualId > 0) && (AppearanceItemData.getInstance().getStone(itemVisualId).getType() == AppearanceType.FIXED) && verifyAndApply(player, item, ItemInstance::getVisualId)) { update = true; } diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java index 138c61fa82..66ec376a94 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java @@ -37,6 +37,7 @@ import java.util.stream.Collectors; import org.l2jmobius.Config; import org.l2jmobius.commons.database.DatabaseFactory; import org.l2jmobius.commons.util.CommonUtil; +import org.l2jmobius.gameserver.data.xml.impl.AppearanceItemData; import org.l2jmobius.gameserver.data.xml.impl.ArmorSetsData; import org.l2jmobius.gameserver.datatables.ItemTable; import org.l2jmobius.gameserver.enums.ItemLocation; @@ -50,6 +51,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; import org.l2jmobius.gameserver.model.holders.ArmorsetSkillHolder; import org.l2jmobius.gameserver.model.items.EtcItem; import org.l2jmobius.gameserver.model.items.Item; +import org.l2jmobius.gameserver.model.items.appearance.AppearanceType; import org.l2jmobius.gameserver.model.items.instance.ItemInstance; import org.l2jmobius.gameserver.model.items.type.EtcItemType; import org.l2jmobius.gameserver.model.items.type.ItemType; @@ -505,8 +507,9 @@ public abstract class Inventory extends ItemContainer update = true; } - // Very and apply visual set - if (verifyAndApply(player, item, ItemInstance::getVisualId)) + // Verify and apply visual set + final int itemVisualId = item.getVisualId(); + if ((itemVisualId > 0) && (AppearanceItemData.getInstance().getStone(itemVisualId).getType() == AppearanceType.FIXED) && verifyAndApply(player, item, ItemInstance::getVisualId)) { update = true; } diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java index 138c61fa82..66ec376a94 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java @@ -37,6 +37,7 @@ import java.util.stream.Collectors; import org.l2jmobius.Config; import org.l2jmobius.commons.database.DatabaseFactory; import org.l2jmobius.commons.util.CommonUtil; +import org.l2jmobius.gameserver.data.xml.impl.AppearanceItemData; import org.l2jmobius.gameserver.data.xml.impl.ArmorSetsData; import org.l2jmobius.gameserver.datatables.ItemTable; import org.l2jmobius.gameserver.enums.ItemLocation; @@ -50,6 +51,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; import org.l2jmobius.gameserver.model.holders.ArmorsetSkillHolder; import org.l2jmobius.gameserver.model.items.EtcItem; import org.l2jmobius.gameserver.model.items.Item; +import org.l2jmobius.gameserver.model.items.appearance.AppearanceType; import org.l2jmobius.gameserver.model.items.instance.ItemInstance; import org.l2jmobius.gameserver.model.items.type.EtcItemType; import org.l2jmobius.gameserver.model.items.type.ItemType; @@ -505,8 +507,9 @@ public abstract class Inventory extends ItemContainer update = true; } - // Very and apply visual set - if (verifyAndApply(player, item, ItemInstance::getVisualId)) + // Verify and apply visual set + final int itemVisualId = item.getVisualId(); + if ((itemVisualId > 0) && (AppearanceItemData.getInstance().getStone(itemVisualId).getType() == AppearanceType.FIXED) && verifyAndApply(player, item, ItemInstance::getVisualId)) { update = true; } diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java index 41b353403c..ee30f2b239 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java @@ -37,6 +37,7 @@ import java.util.stream.Collectors; import org.l2jmobius.Config; import org.l2jmobius.commons.database.DatabaseFactory; import org.l2jmobius.commons.util.CommonUtil; +import org.l2jmobius.gameserver.data.xml.impl.AppearanceItemData; import org.l2jmobius.gameserver.data.xml.impl.ArmorSetsData; import org.l2jmobius.gameserver.datatables.ItemTable; import org.l2jmobius.gameserver.enums.ItemLocation; @@ -50,6 +51,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; import org.l2jmobius.gameserver.model.holders.ArmorsetSkillHolder; import org.l2jmobius.gameserver.model.items.EtcItem; import org.l2jmobius.gameserver.model.items.Item; +import org.l2jmobius.gameserver.model.items.appearance.AppearanceType; import org.l2jmobius.gameserver.model.items.instance.ItemInstance; import org.l2jmobius.gameserver.model.items.type.EtcItemType; import org.l2jmobius.gameserver.model.items.type.ItemType; @@ -510,8 +512,9 @@ public abstract class Inventory extends ItemContainer update = true; } - // Very and apply visual set - if (verifyAndApply(player, item, ItemInstance::getVisualId)) + // Verify and apply visual set + final int itemVisualId = item.getVisualId(); + if ((itemVisualId > 0) && (AppearanceItemData.getInstance().getStone(itemVisualId).getType() == AppearanceType.FIXED) && verifyAndApply(player, item, ItemInstance::getVisualId)) { update = true; } 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 ff448779ce..72110bb6f8 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 @@ -37,6 +37,7 @@ import java.util.stream.Collectors; import org.l2jmobius.Config; import org.l2jmobius.commons.database.DatabaseFactory; import org.l2jmobius.commons.util.CommonUtil; +import org.l2jmobius.gameserver.data.xml.impl.AppearanceItemData; import org.l2jmobius.gameserver.data.xml.impl.ArmorSetsData; import org.l2jmobius.gameserver.datatables.ItemTable; import org.l2jmobius.gameserver.enums.ItemLocation; @@ -50,6 +51,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; import org.l2jmobius.gameserver.model.holders.ArmorsetSkillHolder; import org.l2jmobius.gameserver.model.items.EtcItem; import org.l2jmobius.gameserver.model.items.Item; +import org.l2jmobius.gameserver.model.items.appearance.AppearanceType; import org.l2jmobius.gameserver.model.items.instance.ItemInstance; import org.l2jmobius.gameserver.model.items.type.EtcItemType; import org.l2jmobius.gameserver.model.items.type.ItemType; @@ -533,8 +535,9 @@ public abstract class Inventory extends ItemContainer update = true; } - // Very and apply visual set - if (verifyAndApply(player, item, ItemInstance::getVisualId)) + // Verify and apply visual set + final int itemVisualId = item.getVisualId(); + if ((itemVisualId > 0) && (AppearanceItemData.getInstance().getStone(itemVisualId).getType() == AppearanceType.FIXED) && verifyAndApply(player, item, ItemInstance::getVisualId)) { update = true; } 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 ff448779ce..72110bb6f8 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 @@ -37,6 +37,7 @@ import java.util.stream.Collectors; import org.l2jmobius.Config; import org.l2jmobius.commons.database.DatabaseFactory; import org.l2jmobius.commons.util.CommonUtil; +import org.l2jmobius.gameserver.data.xml.impl.AppearanceItemData; import org.l2jmobius.gameserver.data.xml.impl.ArmorSetsData; import org.l2jmobius.gameserver.datatables.ItemTable; import org.l2jmobius.gameserver.enums.ItemLocation; @@ -50,6 +51,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; import org.l2jmobius.gameserver.model.holders.ArmorsetSkillHolder; import org.l2jmobius.gameserver.model.items.EtcItem; import org.l2jmobius.gameserver.model.items.Item; +import org.l2jmobius.gameserver.model.items.appearance.AppearanceType; import org.l2jmobius.gameserver.model.items.instance.ItemInstance; import org.l2jmobius.gameserver.model.items.type.EtcItemType; import org.l2jmobius.gameserver.model.items.type.ItemType; @@ -533,8 +535,9 @@ public abstract class Inventory extends ItemContainer update = true; } - // Very and apply visual set - if (verifyAndApply(player, item, ItemInstance::getVisualId)) + // Verify and apply visual set + final int itemVisualId = item.getVisualId(); + if ((itemVisualId > 0) && (AppearanceItemData.getInstance().getStone(itemVisualId).getType() == AppearanceType.FIXED) && verifyAndApply(player, item, ItemInstance::getVisualId)) { update = true; }