From 171c79dcf6a9540117db4751a98cef0b4bca253a Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sat, 20 Apr 2024 11:02:35 -0400 Subject: [PATCH] Item prefix and suffix applied --- src/engine/gameManager/ForgeManager.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/engine/gameManager/ForgeManager.java b/src/engine/gameManager/ForgeManager.java index af12f74a..78dd0ba4 100644 --- a/src/engine/gameManager/ForgeManager.java +++ b/src/engine/gameManager/ForgeManager.java @@ -374,8 +374,8 @@ public enum ForgeManager implements Runnable { int modifier = 0; ModTypeTableEntry modTypeTableEntry = null; - ModTableEntry modRollEntry = null; - int modifierRoll; + ModTableEntry modTableEntry = null; + int rollForModifier; switch (itemModType) { case PREFIX: @@ -391,16 +391,16 @@ public enum ForgeManager implements Runnable { if (modTypeTableEntry == null) return 0; - modifierRoll = ThreadLocalRandom.current().nextInt(1, 100 + 1); + rollForModifier = ThreadLocalRandom.current().nextInt(1, 100 + 1); - if (modifierRoll < 80) { - modifierRoll = LootManager.TableRoll(vendor.getLevel(), false); - modRollEntry = ModTableEntry.rollTable(modTypeTableEntry.modTableID, modifierRoll); + if (rollForModifier < 80) { + rollForModifier = LootManager.TableRoll(vendor.getLevel(), false); + modTableEntry = ModTableEntry.rollTable(modTypeTableEntry.modTableID, rollForModifier); } - if (modRollEntry != null) { - AbstractPowerAction abstractPowerAction = PowersManager.getPowerActionByIDString(modRollEntry.action); - modifier = abstractPowerAction.getParent().token; + if (modTableEntry != null) { + AbstractPowerAction abstractPowerAction = PowersManager.getPowerActionByIDString(modTableEntry.action); + modifier = abstractPowerAction.getEffectsBase().getToken(); } return modifier;