temporary enchant stripping

This commit is contained in:
2025-01-27 12:46:10 -06:00
parent fd30e52741
commit bb1a99912c
2 changed files with 7 additions and 3 deletions
+2 -2
View File
@@ -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;
}
+5 -1
View File
@@ -818,11 +818,15 @@ public class Item extends AbstractWorldObject {
}
public void stripCastableEnchants(){
ArrayList<Effect> ToRemove = new ArrayList<>();
for(Effect eff : this.effects.values()){
if(eff.getJobContainer() != null && !eff.getJobContainer().noTimer()){
eff.endEffect();
eff.endEffectNoPower();
eff.getJobContainer().cancelJob();
ToRemove.add(eff);
}
}
this.effects.values().removeAll(ToRemove);
}
//Only to be used for trading
public void setOwnerID(int ownerID) {