From 2ca9b77cfb861f0f6d0d67af86fce1de3b042024 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sat, 15 Jun 2024 19:50:05 -0500 Subject: [PATCH] logging --- src/engine/loot/ItemTableEntry.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/engine/loot/ItemTableEntry.java b/src/engine/loot/ItemTableEntry.java index 012dfc54..b9da4ea3 100644 --- a/src/engine/loot/ItemTableEntry.java +++ b/src/engine/loot/ItemTableEntry.java @@ -9,6 +9,7 @@ package engine.loot; import engine.gameManager.LootManager; +import org.pmw.tinylog.Logger; import java.sql.ResultSet; import java.sql.SQLException; @@ -45,14 +46,16 @@ public class ItemTableEntry { } public static Integer getRandomItem(int itemTable) { - + int id = 0; List itemTableEntryList; itemTableEntryList = LootManager._itemTables.get(itemTable); if(itemTableEntryList != null){ - return (itemTableEntryList.get(ThreadLocalRandom.current().nextInt(0,itemTableEntryList.size() - 1))).cacheID; + id = itemTableEntryList.get(ThreadLocalRandom.current().nextInt(0,itemTableEntryList.size() - 1)).cacheID; } - return 0; + + Logger.error("Rolling Item Table: " + itemTable); + return id; } }