From ec37e1f9f94a9efe385f6b2f0f71d93948da6ed2 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Fri, 7 Apr 2023 18:43:45 -0500 Subject: [PATCH] drop chance work --- 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 97eb5bd5..1b3a9c86 100644 --- a/src/engine/loot/LootManager.java +++ b/src/engine/loot/LootManager.java @@ -118,15 +118,15 @@ public class LootManager { return null; } MobLoot outItem; - int minRollRange = mob.getParentZone().minLvl + mob.getLevel(); - int maxRollRange = (mob.getParentZone().minLvl + mob.getLevel() + mob.getParentZone().maxLvl) * 2; int roll = new Random().nextInt(100); GenTableRow selectedRow = generalItemTables.get(genTableID).getRowForRange(roll); if(selectedRow == null) { return null; } int itemTableId = selectedRow.itemTableID; - int roll2 = new Random().nextInt(maxRollRange) + minRollRange; + int minRollRange = roll + mob.getParentZone().minLvl + mob.getLevel(); + int maxRollRange = (roll + mob.getParentZone().maxLvl + mob.getLevel()) * 2; + int roll2 = new Random().nextInt(maxRollRange- minRollRange) + minRollRange; ItemTableRow tableRow = itemTables.get(itemTableId).getRowForRange(roll2); if(tableRow == null){ return null;