Browse Source

fixed loot generation array size bug

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

2
src/engine/loot/ItemTableEntry.java

@ -51,7 +51,7 @@ public class ItemTableEntry { @@ -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;

Loading…
Cancel
Save