From 576e627ad1c790fe0ef4a2bcbeb58dc84182bcb7 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 7 Jul 2024 21:16:41 -0500 Subject: [PATCH] fixed loot generation array size bug --- src/engine/loot/ItemTableEntry.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/loot/ItemTableEntry.java b/src/engine/loot/ItemTableEntry.java index 0e674eb5..6115bc65 100644 --- a/src/engine/loot/ItemTableEntry.java +++ b/src/engine/loot/ItemTableEntry.java @@ -51,7 +51,7 @@ public class ItemTableEntry { itemTableEntryList = LootManager._itemTables.get(itemTable); - if(itemTableEntryList != null){ + if(itemTableEntryList != null && itemTableEntryList.size() > 0){ id = itemTableEntryList.get(ThreadLocalRandom.current().nextInt(0,itemTableEntryList.size() - 1)).cacheID; } return id;