From 51dfc3a56b09674549e397824333820bac2cbdbd Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sat, 5 Aug 2023 19:23:58 -0400 Subject: [PATCH] Hotzone affects base rate. --- src/engine/gameManager/LootManager.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/engine/gameManager/LootManager.java b/src/engine/gameManager/LootManager.java index 119960bc..bc0d9af3 100644 --- a/src/engine/gameManager/LootManager.java +++ b/src/engine/gameManager/LootManager.java @@ -98,6 +98,7 @@ public enum LootManager { private static void RunBootySet(ArrayList entries, Mob mob, boolean inHotzone, boolean fromDeath) { boolean hotzoneWasRan = false; + float dropRate = LootManager.NORMAL_DROP_RATE; if (fromDeath) { GenerateEquipmentDrop(mob); @@ -113,14 +114,19 @@ public enum LootManager { break; case "LOOT": - if (ThreadLocalRandom.current().nextInt(1, 100 + 1) < (bse.dropChance * NORMAL_DROP_RATE)) + if (inHotzone == true) + dropRate = LootManager.HOTZONE_DROP_RATE; + else + dropRate = LootManager.NORMAL_DROP_RATE; + + if (ThreadLocalRandom.current().nextInt(1, 100 + 1) < (bse.dropChance * dropRate)) GenerateLootDrop(mob, bse.lootTable, false); //generate normal loot drop // Generate hotzone loot if in hotzone // Only one bite at the hotzone apple per bootyset. if (inHotzone == true && hotzoneWasRan == false) - if (generalItemTables.containsKey(bse.lootTable + 1) && ThreadLocalRandom.current().nextInt(1, 100 + 1) < (bse.dropChance * HOTZONE_DROP_RATE)) { + if (generalItemTables.containsKey(bse.lootTable + 1) && ThreadLocalRandom.current().nextInt(1, 100 + 1) < (bse.dropChance * dropRate)) { GenerateLootDrop(mob, bse.lootTable + 1, true); //generate loot drop from hotzone table hotzoneWasRan = true; }