From 07c64f9b46b129ca98761ed8b7e9b82264ef46cf Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Wed, 19 Jul 2023 18:05:20 -0500 Subject: [PATCH] hotfix mob roll finalized --- src/engine/loot/LootManager.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/engine/loot/LootManager.java b/src/engine/loot/LootManager.java index 63855d35..55944f87 100644 --- a/src/engine/loot/LootManager.java +++ b/src/engine/loot/LootManager.java @@ -95,10 +95,11 @@ public class LootManager { } for (BootySetEntry bse : entries) { int roll; + float dropChance = bse.dropChance * multiplier; switch (bse.bootyType) { case "GOLD": roll = ThreadLocalRandom.current().nextInt(101); - if (roll > (bse.dropChance * multiplier)) { + if (roll > dropChance) { //early exit, failed to hit minimum chance roll OR booty was generated from mob's death break; } @@ -111,8 +112,7 @@ public class LootManager { break; case "LOOT": roll = ThreadLocalRandom.current().nextInt(101); - float dropChance = bse.dropChance * multiplier; - if (roll > (bse.dropChance * multiplier)) { + if (roll > dropChance) { //early exit, failed to hit minimum chance roll break; }