diff --git a/src/engine/db/handlers/dbItemHandler.java b/src/engine/db/handlers/dbItemHandler.java index 1a620090..89a87987 100644 --- a/src/engine/db/handlers/dbItemHandler.java +++ b/src/engine/db/handlers/dbItemHandler.java @@ -179,6 +179,7 @@ public class dbItemHandler extends dbHandlerBase { int templateID = rs.getInt("id"); JSONObject jsonObject = (JSONObject) jsonParser.parse(rs.getString("template")); ItemTemplate itemTemplate = new ItemTemplate(jsonObject); + itemTemplate.template_id = templateID; ItemTemplate.itemTemplates.put(templateID, itemTemplate); } diff --git a/src/engine/objects/ItemTemplate.java b/src/engine/objects/ItemTemplate.java index fde75522..e1412de2 100644 --- a/src/engine/objects/ItemTemplate.java +++ b/src/engine/objects/ItemTemplate.java @@ -23,6 +23,8 @@ public class ItemTemplate { // Global template lookup public static HashMap itemTemplates = new HashMap<>(); + public int template_id; + // Template Properties public String obj_name; public boolean obj_pickable;