Browse Source

castable enchants removed when being traded or banked or vaulted

lakebane-master
FatBoy-DOTC 10 months ago
parent
commit
4540e5c770
  1. 12
      src/engine/objects/CharacterItemManager.java

12
src/engine/objects/CharacterItemManager.java

@ -19,6 +19,7 @@ import engine.net.DispatchMessage;
import engine.net.client.ClientConnection; import engine.net.client.ClientConnection;
import engine.net.client.ClientMessagePump; import engine.net.client.ClientMessagePump;
import engine.net.client.msg.*; import engine.net.client.msg.*;
import engine.powers.poweractions.AbstractPowerAction;
import engine.server.MBServerStatics; import engine.server.MBServerStatics;
import org.pmw.tinylog.Logger; import org.pmw.tinylog.Logger;
@ -638,6 +639,7 @@ public class CharacterItemManager {
dispatch = Dispatch.borrow(other, utwm); dispatch = Dispatch.borrow(other, utwm);
DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.PRIMARY); DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.PRIMARY);
stripTempEnchants(i);
return true; return true;
} }
@ -1053,7 +1055,7 @@ public class CharacterItemManager {
i.addToCache(); i.addToCache();
calculateWeights(); calculateWeights();
stripTempEnchants(i);
return true; return true;
} }
@ -1198,10 +1200,14 @@ public class CharacterItemManager {
i.addToCache(); i.addToCache();
calculateWeights(); calculateWeights();
stripTempEnchants(i);
return true; return true;
} }
private static void stripTempEnchants(Item i) {
i.clearEffects();
}
//Used for buying MobEquipment from NPC //Used for buying MobEquipment from NPC
//Handles the gold transfer aspect //Handles the gold transfer aspect
@ -2444,7 +2450,7 @@ public class CharacterItemManager {
i.setOwnerID(0); i.setOwnerID(0);
calculateWeights(); calculateWeights();
stripTempEnchants(i);
return true; return true;
} }

Loading…
Cancel
Save