From 9a40e12dbc2f39521d11eed8cfd3c7fbdbcfaa64 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Fri, 13 Sep 2024 19:33:58 -0500 Subject: [PATCH] castable enchants removed when item leaves players immediate posession --- src/engine/objects/CharacterItemManager.java | 2 ++ src/engine/objects/Item.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/engine/objects/CharacterItemManager.java b/src/engine/objects/CharacterItemManager.java index 973512fb..cde911e6 100644 --- a/src/engine/objects/CharacterItemManager.java +++ b/src/engine/objects/CharacterItemManager.java @@ -1056,6 +1056,7 @@ public class CharacterItemManager { // add to Bank this.bank.add(i); i.addToCache(); + i.stripCastableEnchants(); calculateWeights(); @@ -1204,6 +1205,7 @@ public class CharacterItemManager { calculateWeights(); + i.stripCastableEnchants(); return true; } diff --git a/src/engine/objects/Item.java b/src/engine/objects/Item.java index 25594bc8..084ffde2 100644 --- a/src/engine/objects/Item.java +++ b/src/engine/objects/Item.java @@ -1085,6 +1085,7 @@ public class Item extends AbstractWorldObject { this.ownerID = pc.getObjectUUID(); this.ownerType = OwnerType.PlayerCharacter; this.containerType = ItemContainerType.INVENTORY; + this.stripCastableEnchants(); return true; } @@ -1105,6 +1106,7 @@ public class Item extends AbstractWorldObject { this.ownerID = npc.getObjectUUID(); this.ownerType = OwnerType.Npc; this.containerType = Enum.ItemContainerType.INVENTORY; + this.stripCastableEnchants(); return true; }