Browse Source

start random roll at 0 to avoid illegal argument

lakebane-strongholds
FatBoy-DOTC 4 months ago
parent
commit
a418224bbb
  1. 4
      src/engine/loot/ItemTableEntry.java

4
src/engine/loot/ItemTableEntry.java

@ -51,8 +51,8 @@ public class ItemTableEntry {
itemTableEntryList = LootManager._itemTables.get(itemTable); itemTableEntryList = LootManager._itemTables.get(itemTable);
if(itemTableEntryList != null && itemTableEntryList.size() > 0){ if(itemTableEntryList != null && itemTableEntryList.size() > 1){
id = itemTableEntryList.get(ThreadLocalRandom.current().nextInt(1,itemTableEntryList.size() - 1)).cacheID; id = itemTableEntryList.get(ThreadLocalRandom.current().nextInt(0,itemTableEntryList.size() - 1)).cacheID;
} }
return id; return id;
} }

Loading…
Cancel
Save