From 339b6c5025a3e695d11755eb934d3aa008589871 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 7 Aug 2023 13:55:22 -0400 Subject: [PATCH] Using LootManager for forge scaling. --- src/engine/objects/ItemFactory.java | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/engine/objects/ItemFactory.java b/src/engine/objects/ItemFactory.java index 6eaa0987..8469adbb 100644 --- a/src/engine/objects/ItemFactory.java +++ b/src/engine/objects/ItemFactory.java @@ -667,15 +667,6 @@ public class ItemFactory { return null; } - float calculatedMobLevel; - calculatedMobLevel = vendor.getLevel(); - - if (calculatedMobLevel < 16) - calculatedMobLevel = 16; - - if (calculatedMobLevel > 49) - calculatedMobLevel = 49; - itemModTable = (byte) ib.getModTable(); if (!vendor.getItemModTable().contains(itemModTable)) { @@ -710,7 +701,7 @@ public class ItemFactory { if (rollPrefix < 80) { - int randomPrefix = LootManager.TableRoll((int) calculatedMobLevel, false); + int randomPrefix = LootManager.TableRoll(vendor.getLevel(), false); prefixEntry = ModTableEntry.rollTable(prefixTypeTable.modTableID, randomPrefix); if (prefixEntry != null) @@ -722,7 +713,7 @@ public class ItemFactory { if (rollSuffix < 80) { - int randomSuffix = LootManager.TableRoll((int) calculatedMobLevel, false); + int randomSuffix = LootManager.TableRoll(vendor.getLevel(), false); suffixEntry = ModTableEntry.rollTable(suffixTypeTable.modTableID, randomSuffix); if (suffixEntry != null)