Browse Source

Apply effects to item

combat-2
MagicBot 7 months ago
parent
commit
3071cb5847
  1. 8
      src/engine/gameManager/ForgeManager.java
  2. 2
      src/engine/gameManager/ItemManager.java

8
src/engine/gameManager/ForgeManager.java

@ -313,6 +313,14 @@ public enum ForgeManager implements Runnable {
else else
forgedItem.suffixToken = workOrder.suffixToken; forgedItem.suffixToken = workOrder.suffixToken;
// Apple effects
if (forgedItem.prefixToken != 0)
ItemManager.applyPrefixOrSuffix(forgedItem, forgedItem.prefixToken);
if (forgedItem.suffixToken != 0)
ItemManager.applyPrefixOrSuffix(forgedItem, forgedItem.prefixToken);
// Forged random rolled items are unidentified until completed // Forged random rolled items are unidentified until completed
if (workOrder.prefixToken == 0 && workOrder.suffixToken == 0) if (workOrder.prefixToken == 0 && workOrder.suffixToken == 0)

2
src/engine/gameManager/ItemManager.java

@ -226,7 +226,7 @@ public enum ItemManager {
return true; return true;
} }
public static void addPrefixOrSuffix(Item item, int token) { public static void applyPrefixOrSuffix(Item item, int token) {
EffectsBase effectsBase = PowersManager.getEffectByToken(token); EffectsBase effectsBase = PowersManager.getEffectByToken(token);
AbstractPowerAction apa = PowersManager.getPowerActionByIDString(effectsBase.getIDString()); AbstractPowerAction apa = PowersManager.getPowerActionByIDString(effectsBase.getIDString());

Loading…
Cancel
Save