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; }