From c133b2da5c3cdf1f91abd9a7b60ca8e5685700ae Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sat, 20 Apr 2024 10:20:02 -0400 Subject: [PATCH] Item prefix and suffix applied --- src/engine/gameManager/ForgeManager.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/engine/gameManager/ForgeManager.java b/src/engine/gameManager/ForgeManager.java index 75d96b86..12f15ee5 100644 --- a/src/engine/gameManager/ForgeManager.java +++ b/src/engine/gameManager/ForgeManager.java @@ -291,18 +291,15 @@ public enum ForgeManager implements Runnable { private static void applyItemEffects(Item forgedItem) { - ModTableEntry prefixEntry = ModTableEntry.rollTable(forgedItem.template.modTable, forgedItem.prefixToken); - ModTableEntry suffixEntry = ModTableEntry.rollTable(forgedItem.template.modTable, forgedItem.suffixToken); - if (forgedItem.prefixToken != 0) { - EffectsBase prefix = PowersManager.getEffectByIDString(prefixEntry.action); + EffectsBase prefix = PowersManager.getEffectByToken(forgedItem.prefixToken); AbstractPowerAction abstractPowerAction = PowersManager.getPowerActionByIDString(prefix.getIDString()); abstractPowerAction.applyEffectForItem(forgedItem, 0); forgedItem.getEffectNames().add(prefix.getName()); } if (forgedItem.prefixToken != 0) { - EffectsBase suffix = PowersManager.getEffectByIDString(suffixEntry.action); + EffectsBase suffix = PowersManager.getEffectByToken(forgedItem.suffixToken); AbstractPowerAction abstractPowerAction = PowersManager.getPowerActionByIDString(suffix.getIDString()); abstractPowerAction.applyEffectForItem(forgedItem, 0); forgedItem.getEffectNames().add(suffix.getName());