From 99fc4b8671bc169b3d334706cf40414b46902412 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Thu, 27 Jul 2023 23:39:14 -0500 Subject: [PATCH] fixed HZ loot issue --- src/engine/loot/LootManager.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/engine/loot/LootManager.java b/src/engine/loot/LootManager.java index 08c49b9a..02582c5b 100644 --- a/src/engine/loot/LootManager.java +++ b/src/engine/loot/LootManager.java @@ -47,6 +47,7 @@ public class LootManager { } public static void GenerateMobLoot(Mob mob, boolean fromDeath) { + try{ //determine if mob is in hotzone boolean inHotzone = ZoneManager.inHotZone(mob.getLoc()); //get multiplier form config manager @@ -57,7 +58,7 @@ public class LootManager { } //iterate the booty sets if (mob.getMobBase().bootySet != 0 && NPCManager._bootySetMap.containsKey(mob.getMobBase().bootySet)) { - RunBootySet(NPCManager._bootySetMap.get(mob.getMobBase().bootySet), mob, multiplier, inHotzone, fromDeath); + RunBootySet(NPCManager._bootySetMap.get(mob.getMobBase().bootySet), mob, multiplier, inHotzone, fromDeath); } if (mob.bootySet != 0) { RunBootySet(NPCManager._bootySetMap.get(mob.bootySet), mob, multiplier, inHotzone, fromDeath); @@ -75,6 +76,9 @@ public class LootManager { } } + } catch(Exception e){ + //TODO catch whatever went wrong + } } private static void RunBootySet(ArrayList entries, Mob mob, float multiplier, boolean inHotzone, boolean fromDeath) { @@ -239,8 +243,8 @@ public class LootManager { } private static int TableRoll(int mobLevel){ int max = (int)(4.882 * mobLevel + 121.0); - if(max > 321){ - max = 321; + if(max > 320){ + max = 320; } int min = (int)(4.469 * mobLevel - 3.469); int roll = ThreadLocalRandom.current().nextInt(max-min) + min;