From 5b547611a5ec66790dffbe6c56d7dc9b3c5d49e3 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 19 Feb 2024 01:58:27 -0500 Subject: [PATCH] Starting work on type. --- src/engine/objects/ItemTemplate.java | 8 ++------ src/engine/server/world/WorldServer.java | 6 +++--- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/engine/objects/ItemTemplate.java b/src/engine/objects/ItemTemplate.java index 8391e4be..53ab973d 100644 --- a/src/engine/objects/ItemTemplate.java +++ b/src/engine/objects/ItemTemplate.java @@ -12,7 +12,6 @@ import engine.Enum; import engine.math.Vector3fImmutable; import org.json.simple.JSONArray; import org.json.simple.JSONObject; -import org.pmw.tinylog.Logger; import java.util.EnumSet; import java.util.HashMap; @@ -79,11 +78,8 @@ public class ItemTemplate { // Parsing an enum - try { - item_type = Enum.ItemType.valueOf((String) jsonObject.get("item_type")); - } catch (Exception e) { - Logger.error((String) jsonObject.get("item_type")); - } + // item_type = Enum.ItemType.valueOf((String) jsonObject.get("item_type")); + item_eq_slots_value = ((Long) jsonObject.get("item_eq_slots_value")).intValue(); item_eq_slots_type = (boolean) jsonObject.get("item_eq_slots_type"); diff --git a/src/engine/server/world/WorldServer.java b/src/engine/server/world/WorldServer.java index 1f0e1570..af80feae 100644 --- a/src/engine/server/world/WorldServer.java +++ b/src/engine/server/world/WorldServer.java @@ -339,12 +339,12 @@ public class WorldServer { Logger.info("Initializing MeshBounds"); MeshBounds.InitializeBuildingBounds(); - Logger.info("Loading ItemBases"); - ItemBase.loadAllItemBases(); - Logger.info("Loading Item Templates"); DbManager.ItemQueries.LOAD_ITEM_TEMPLATES(); + Logger.info("Loading ItemBases"); + ItemBase.loadAllItemBases(); + Logger.info("Loading PromotionClasses"); DbManager.PromotionQueries.GET_ALL_PROMOTIONS();