Browse Source

castable enchants removed when item leaves players immediate posession

lakebane-mine-tele
FatBoy-DOTC 2 months ago
parent
commit
9a40e12dbc
  1. 2
      src/engine/objects/CharacterItemManager.java
  2. 2
      src/engine/objects/Item.java

2
src/engine/objects/CharacterItemManager.java

@ -1056,6 +1056,7 @@ public class CharacterItemManager {
// add to Bank // add to Bank
this.bank.add(i); this.bank.add(i);
i.addToCache(); i.addToCache();
i.stripCastableEnchants();
calculateWeights(); calculateWeights();
@ -1204,6 +1205,7 @@ public class CharacterItemManager {
calculateWeights(); calculateWeights();
i.stripCastableEnchants();
return true; return true;
} }

2
src/engine/objects/Item.java

@ -1085,6 +1085,7 @@ public class Item extends AbstractWorldObject {
this.ownerID = pc.getObjectUUID(); this.ownerID = pc.getObjectUUID();
this.ownerType = OwnerType.PlayerCharacter; this.ownerType = OwnerType.PlayerCharacter;
this.containerType = ItemContainerType.INVENTORY; this.containerType = ItemContainerType.INVENTORY;
this.stripCastableEnchants();
return true; return true;
} }
@ -1105,6 +1106,7 @@ public class Item extends AbstractWorldObject {
this.ownerID = npc.getObjectUUID(); this.ownerID = npc.getObjectUUID();
this.ownerType = OwnerType.Npc; this.ownerType = OwnerType.Npc;
this.containerType = Enum.ItemContainerType.INVENTORY; this.containerType = Enum.ItemContainerType.INVENTORY;
this.stripCastableEnchants();
return true; return true;
} }

Loading…
Cancel
Save