Browse Source

Error logging addded

combat-2
MagicBot 8 months ago
parent
commit
7f830a18cd
  1. 41
      src/engine/objects/ItemBase.java

41
src/engine/objects/ItemBase.java

@ -80,24 +80,29 @@ public class ItemBase {
this.twoHanded = (rs.getInt("twoHanded") == 1); this.twoHanded = (rs.getInt("twoHanded") == 1);
switch (ItemTemplate.itemTemplates.get(this.getUUID()).item_type) { ItemTemplate template = ItemTemplate.itemTemplates.get(this.getUUID());
case RUNE:
case SCROLL: if (template == null)
case WAND: Logger.error(this.getUUID() + " null template");
case POTION: else
case CHARTER: switch (ItemTemplate.itemTemplates.get(this.getUUID()).item_type) {
case DEED: case RUNE:
case EMPLOYMENTCONTRACT: case SCROLL:
case BUCKET: case WAND:
case REALMCHARTER: case POTION:
case TREASURE: case CHARTER:
this.isConsumable = true; case DEED:
break; case EMPLOYMENTCONTRACT:
case OFFERING: case BUCKET:
this.isConsumable = true; case REALMCHARTER:
Boon.HandleBoonListsForItemBase(uuid); case TREASURE:
break; this.isConsumable = true;
} break;
case OFFERING:
this.isConsumable = true;
Boon.HandleBoonListsForItemBase(uuid);
break;
}
try { try {
DbManager.ItemBaseQueries.LOAD_ANIMATIONS(this); DbManager.ItemBaseQueries.LOAD_ANIMATIONS(this);

Loading…
Cancel
Save