Browse Source

Item prefix and suffix applied

combat-2
MagicBot 8 months ago
parent
commit
13a75fcd5d
  1. 22
      src/engine/gameManager/ForgeManager.java

22
src/engine/gameManager/ForgeManager.java

@ -15,6 +15,7 @@ import engine.net.DispatchMessage; @@ -15,6 +15,7 @@ import engine.net.DispatchMessage;
import engine.net.client.msg.ItemProductionMsg;
import engine.objects.*;
import engine.powers.EffectsBase;
import engine.powers.poweractions.AbstractPowerAction;
import org.pmw.tinylog.Logger;
import java.util.ArrayList;
@ -289,20 +290,21 @@ public enum ForgeManager implements Runnable { @@ -289,20 +290,21 @@ public enum ForgeManager implements Runnable {
private static void applyItemEffects(Item forgedItem) {
String prefixString;
String suffixString;
EffectsBase prefix = PowersManager.getEffectByToken(forgedItem.prefixToken);
EffectsBase prefixEffect = PowersManager.getEffectByIDString(prefix.getIDString() + 'A');
EffectsBase suffix = PowersManager.getEffectByToken(forgedItem.suffixToken);
EffectsBase suffixEffect = PowersManager.getEffectByIDString(suffix.getIDString() + 'A');
// if (forgedItem.prefixToken != 0)
// ItemManager.applyPrefixOrSuffix(forgedItem, prefixEffect.ac);
if (forgedItem.prefixToken != 0) {
AbstractPowerAction abstractPowerAction = PowersManager.getPowerActionByIDString(prefix.getIDString());
abstractPowerAction.applyEffectForItem(forgedItem, 0);
forgedItem.getEffectNames().add(prefix.getName());
}
if (forgedItem.suffixToken != 0) {
AbstractPowerAction abstractPowerAction = PowersManager.getPowerActionByIDString(suffix.getIDString());
abstractPowerAction.applyEffectForItem(forgedItem, 0);
forgedItem.getEffectNames().add(suffix.getName());
}
// if (forgedItem.suffixToken != 0)
// ItemManager.applyPrefixOrSuffix(forgedItem, suffixEffect);
}
public static void completeWorkOrderBatch(WorkOrder workOrder) {

Loading…
Cancel
Save