Browse Source

No enchants loaded from db for negative id items

combat-2
MagicBot 8 months ago
parent
commit
3fc5fa71a4
  1. 6
      src/engine/objects/Item.java

6
src/engine/objects/Item.java

@ -998,8 +998,10 @@ public class Item extends AbstractWorldObject { @@ -998,8 +998,10 @@ public class Item extends AbstractWorldObject {
}
public final void loadEnchantments() {
//dont load mobloot enchantments, they arent in db.
if (this.getObjectType().equals(GameObjectType.MobLoot)) {
// No enchantments for negative id items in the db. Early exit.
if (this.objectUUID < 0) {
this.magicValue = this.template.item_value + calcMagicValue();
return;
}

Loading…
Cancel
Save