From 601d0f4324de4b8513b4bda163bddd06e3d2320a Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Tue, 27 Aug 2024 19:30:02 -0500 Subject: [PATCH] special case drop rate for contracts runes and resources completed --- src/engine/gameManager/LootManager.java | 30 +++++++++++++++++-------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/src/engine/gameManager/LootManager.java b/src/engine/gameManager/LootManager.java index 33125c64..6953d51e 100644 --- a/src/engine/gameManager/LootManager.java +++ b/src/engine/gameManager/LootManager.java @@ -207,9 +207,13 @@ public enum LootManager { int ContractTableID = 0; for(GenTableEntry entry : _genTables.get(lootTableID)){ - if(ItemBase.getItemBase(_itemTables.get(entry.itemTableID).get(0).cacheID).getType().equals(Enum.ItemType.CONTRACT)){ - ContractTableID = entry.itemTableID; - break; + try { + if (ItemBase.getItemBase(_itemTables.get(entry.itemTableID).get(0).cacheID).getType().equals(Enum.ItemType.CONTRACT)) { + ContractTableID = entry.itemTableID; + break; + } + }catch(Exception e){ + } } @@ -237,9 +241,13 @@ public enum LootManager { int RuneTableID = 0; for(GenTableEntry entry : _genTables.get(lootTableID)){ - if(ItemBase.getItemBase(_itemTables.get(entry.itemTableID).get(0).cacheID).getType().equals(Enum.ItemType.RUNE)){ - RuneTableID = entry.itemTableID; - break; + try { + if (ItemBase.getItemBase(_itemTables.get(entry.itemTableID).get(0).cacheID).getType().equals(Enum.ItemType.RUNE)) { + RuneTableID = entry.itemTableID; + break; + } + }catch(Exception e){ + } } @@ -267,9 +275,13 @@ public enum LootManager { int ResourceTableID = 0; for(GenTableEntry entry : _genTables.get(lootTableID)){ - if(ItemBase.getItemBase(_itemTables.get(entry.itemTableID).get(0).cacheID).getType().equals(Enum.ItemType.RESOURCE)){ - ResourceTableID = entry.itemTableID; - break; + try { + if (ItemBase.getItemBase(_itemTables.get(entry.itemTableID).get(0).cacheID).getType().equals(Enum.ItemType.RESOURCE)) { + ResourceTableID = entry.itemTableID; + break; + } + }catch(Exception e){ + } }