From a418224bbbf46243315eb22d80ca15027e255c48 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Thu, 11 Jul 2024 19:41:32 -0500 Subject: [PATCH] start random roll at 0 to avoid illegal argument --- src/engine/loot/ItemTableEntry.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/loot/ItemTableEntry.java b/src/engine/loot/ItemTableEntry.java index df1a6f45..471e32da 100644 --- a/src/engine/loot/ItemTableEntry.java +++ b/src/engine/loot/ItemTableEntry.java @@ -51,8 +51,8 @@ public class ItemTableEntry { itemTableEntryList = LootManager._itemTables.get(itemTable); - if(itemTableEntryList != null && itemTableEntryList.size() > 0){ - id = itemTableEntryList.get(ThreadLocalRandom.current().nextInt(1,itemTableEntryList.size() - 1)).cacheID; + if(itemTableEntryList != null && itemTableEntryList.size() > 1){ + id = itemTableEntryList.get(ThreadLocalRandom.current().nextInt(0,itemTableEntryList.size() - 1)).cacheID; } return id; }