Browse Source

castable enchants removed when being traded or banked or vaulted

lakebane-master
FatBoy-DOTC 9 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; @@ -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 { @@ -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 { @@ -1053,7 +1055,7 @@ public class CharacterItemManager {
i.addToCache();
calculateWeights();
stripTempEnchants(i);
return true;
}
@ -1198,10 +1200,14 @@ public class CharacterItemManager { @@ -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 { @@ -2444,7 +2450,7 @@ public class CharacterItemManager {
i.setOwnerID(0);
calculateWeights();
stripTempEnchants(i);
return true;
}

Loading…
Cancel
Save