Browse Source

Logging null templates

combat-2
MagicBot 9 months ago
parent
commit
1306ea3c5c
  1. 5
      src/engine/objects/ItemBase.java

5
src/engine/objects/ItemBase.java

@ -181,7 +181,10 @@ public class ItemBase {
ItemTemplate template = ItemTemplate.itemTemplates.get(itemBase.uuid); ItemTemplate template = ItemTemplate.itemTemplates.get(itemBase.uuid);
_IDsByNames.put(template.item_base_name.toLowerCase().replace(" ", "_"), itemBase.uuid); if (template == null)
Logger.error("Null template for: " + itemBase.uuid);
else
_IDsByNames.put(template.item_base_name.toLowerCase().replace(" ", "_"), itemBase.uuid);
} }
public static HashMap<Integer, Integer> getItemHashIDMap() { public static HashMap<Integer, Integer> getItemHashIDMap() {

Loading…
Cancel
Save