From 8b6bc3808251009edd96c0b015609bc05013dbf1 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Fri, 7 Apr 2023 12:05:01 -0500 Subject: [PATCH] error tracking --- src/engine/loot/LootManager.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/engine/loot/LootManager.java b/src/engine/loot/LootManager.java index 2a099e80..6cb2e12b 100644 --- a/src/engine/loot/LootManager.java +++ b/src/engine/loot/LootManager.java @@ -100,6 +100,9 @@ public class LootManager { } } public static Item getGenTableItem(int genTableID, Mob mob){ + if(genTableID == 0 ||mob == null){ + return null; + } Item outItem; int minRollRange = mob.getParentZone().minLvl + mob.getLevel(); int maxRollRange = (mob.getParentZone().minLvl + mob.getLevel() + mob.getParentZone().maxLvl) * 2; @@ -160,7 +163,7 @@ public class LootManager { } } public static void AddModTableRow(int tableID,ModTableRow row){ - if(!itemTables.containsKey(tableID)){ + if(!modTables.containsKey(tableID)){ //create the new table ModTable mt = new ModTable(); mt.rows.add(row);