From 57028101082ed1e044d21d4fceba382b277e6d89 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Tue, 8 Aug 2023 19:37:42 -0500 Subject: [PATCH] fate peddler work --- src/engine/gameManager/LootManager.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/engine/gameManager/LootManager.java b/src/engine/gameManager/LootManager.java index 69b6f91e..2c147855 100644 --- a/src/engine/gameManager/LootManager.java +++ b/src/engine/gameManager/LootManager.java @@ -362,7 +362,12 @@ public enum LootManager { mob.getCharItemManager().addItemToInventory(lootItem); } public static void peddleFate(AbstractCharacter character, int giftID){ - int tableID = LootManager._bootySetMap.get(giftID).get(ThreadLocalRandom.current().nextInt(1,LootManager._bootySetMap.get(giftID).size() - 1)).genTable; + int tableID = 0; + if(LootManager._bootySetMap.get(giftID) != null) { + tableID = LootManager._bootySetMap.get(giftID).get(ThreadLocalRandom.current().nextInt(1, LootManager._bootySetMap.get(giftID).size() - 1)).genTable; + } else{ + return; + } MobLoot gamblingResult= getGenTableItem(tableID,character,false); if(gamblingResult != null){ gamblingResult.promoteToItem((PlayerCharacter)character);