From 4540e5c77028b08ca395f02e1e04fe4d37901f22 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Wed, 28 Feb 2024 20:32:14 -0600 Subject: [PATCH] castable enchants removed when being traded or banked or vaulted --- src/engine/objects/CharacterItemManager.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/engine/objects/CharacterItemManager.java b/src/engine/objects/CharacterItemManager.java index 2a1d7e81..557ab7dc 100644 --- a/src/engine/objects/CharacterItemManager.java +++ b/src/engine/objects/CharacterItemManager.java @@ -19,6 +19,7 @@ import engine.net.DispatchMessage; import engine.net.client.ClientConnection; import engine.net.client.ClientMessagePump; import engine.net.client.msg.*; +import engine.powers.poweractions.AbstractPowerAction; import engine.server.MBServerStatics; import org.pmw.tinylog.Logger; @@ -638,6 +639,7 @@ public class CharacterItemManager { dispatch = Dispatch.borrow(other, utwm); DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.PRIMARY); + stripTempEnchants(i); return true; } @@ -1053,7 +1055,7 @@ public class CharacterItemManager { i.addToCache(); calculateWeights(); - + stripTempEnchants(i); return true; } @@ -1198,10 +1200,14 @@ public class CharacterItemManager { i.addToCache(); calculateWeights(); - + stripTempEnchants(i); return true; } + private static void stripTempEnchants(Item i) { + i.clearEffects(); + } + //Used for buying MobEquipment from NPC //Handles the gold transfer aspect @@ -2444,7 +2450,7 @@ public class CharacterItemManager { i.setOwnerID(0); calculateWeights(); - + stripTempEnchants(i); return true; }