diff --git a/src/engine/objects/CharacterItemManager.java b/src/engine/objects/CharacterItemManager.java index cde911e6..3aaa74f3 100644 --- a/src/engine/objects/CharacterItemManager.java +++ b/src/engine/objects/CharacterItemManager.java @@ -610,7 +610,7 @@ public class CharacterItemManager { if (i == null) return false; - i.stripCastableEnchants(); + //i.stripCastableEnchants(); if (!this.doesCharOwnThisItem(i.getObjectUUID())) return false; @@ -1056,7 +1056,7 @@ public class CharacterItemManager { // add to Bank this.bank.add(i); i.addToCache(); - i.stripCastableEnchants(); + //i.stripCastableEnchants(); calculateWeights(); @@ -1205,7 +1205,7 @@ public class CharacterItemManager { calculateWeights(); - i.stripCastableEnchants(); + //i.stripCastableEnchants(); return true; } @@ -2013,7 +2013,7 @@ public class CharacterItemManager { if (item.getItemBase().getType().equals(ItemType.GOLD)) { int amt = item.getNumOfItems(); item.setNumOfItems(0); - item.stripCastableEnchants(); + //item.stripCastableEnchants(); MobLoot ml = new MobLoot(this.absCharacter, amt); ml.zeroItem(); ml.containerType = Enum.ItemContainerType.INVENTORY; diff --git a/src/engine/objects/Item.java b/src/engine/objects/Item.java index e6038ae8..19f339ae 100644 --- a/src/engine/objects/Item.java +++ b/src/engine/objects/Item.java @@ -818,22 +818,9 @@ public class Item extends AbstractWorldObject { } public void stripCastableEnchants(){ - ArrayList keys =new ArrayList<>(); - - for(String eff : this.effects.keySet()){ - for(AbstractEffectModifier mod : this.effects.get(eff).getEffectsBase().getModifiers()){ - if(mod.modType.equals(ModType.WeaponProc)){ - keys.add(eff); - } - } - } - - for(String eff : keys){ - try { - this.effects.get(eff).endEffect(); - this.effects.remove(eff); - }catch(Exception e){ - + for(Effect eff : this.effects.values()){ + if(eff.getJobContainer() != null && !eff.getJobContainer().noTimer()){ + eff.endEffect(); } } } @@ -1085,7 +1072,7 @@ public class Item extends AbstractWorldObject { this.ownerID = pc.getObjectUUID(); this.ownerType = OwnerType.PlayerCharacter; this.containerType = ItemContainerType.INVENTORY; - this.stripCastableEnchants(); + //this.stripCastableEnchants(); return true; } @@ -1106,7 +1093,7 @@ public class Item extends AbstractWorldObject { this.ownerID = npc.getObjectUUID(); this.ownerType = OwnerType.Npc; this.containerType = Enum.ItemContainerType.INVENTORY; - this.stripCastableEnchants(); + //this.stripCastableEnchants(); return true; } @@ -1124,7 +1111,7 @@ public class Item extends AbstractWorldObject { this.ownerID = 0; this.ownerType = null; this.containerType = Enum.ItemContainerType.INVENTORY; - this.stripCastableEnchants(); + //this.stripCastableEnchants(); return true; }