parser now uses poweractiontype

This commit is contained in:
2025-02-21 13:15:01 -05:00
parent 2bc033170f
commit 78e8aab808
5 changed files with 65 additions and 76 deletions
+29 -41
View File
@@ -138,7 +138,7 @@ public enum PowersManager {
for (PowerAction powerAction : WpakPowerManager._powerActionLookup.values()) {
AbstractPowerAction apa;
String type = powerAction.action_type;
PowerActionType type = powerAction.action_type;
String IDString = powerAction.action_id;
int token = DbManager.hasher.SBStringHash(IDString);
//cache token, used for applying effects.
@@ -148,102 +148,90 @@ public enum PowersManager {
default:
Logger.error("valid type not found for poweraction of ID" + IDString);
break;
case "ApplyEffect":
case ApplyEffect:
apa = new ApplyEffectPowerAction(powerAction, effects);
break;
case "ApplyEffects":
case ApplyEffects:
apa = new ApplyEffectsPowerAction(powerAction, effects);
break;
case "DeferredPower":
case DeferredPower:
apa = new DeferredPowerPowerAction(powerAction, effects);
break;
case "DamageOverTime":
case DamageOverTime:
apa = new DamageOverTimePowerAction(powerAction, effects);
break;
case "Peek":
case Peek:
apa = new PeekPowerAction(powerAction);
break;
case "Charm":
case Charm:
apa = new CharmPowerAction(powerAction);
break;
case "Fear":
apa = new FearPowerAction(powerAction);
break;
case "Confusion":
apa = new ConfusionPowerAction(powerAction);
break;
case "RemoveEffect":
case RemoveEffect:
apa = new RemoveEffectPowerAction(powerAction);
break;
case "Track":
case Track:
apa = new TrackPowerAction(powerAction, effects);
break;
case "DirectDamage":
case DirectDamage:
apa = new DirectDamagePowerAction(powerAction, effects);
break;
case "Transform":
case Transform:
apa = new TransformPowerAction(powerAction, effects);
break;
case "CreateMob":
case CreateMob:
apa = new CreateMobPowerAction(powerAction);
break;
case "Invis":
case Invis:
apa = new InvisPowerAction(powerAction, effects);
break;
case "ClearNearbyAggro":
case ClearNearbyAggro:
apa = new ClearNearbyAggroPowerAction(powerAction);
break;
case "MobRecall":
case MobRecall:
apa = new MobRecallPowerAction(powerAction);
break;
case "SetItemFlag":
case SetItemFlag:
apa = new SetItemFlagPowerAction(powerAction);
break;
case "SimpleDamage":
case SimpleDamage:
apa = new SimpleDamagePowerAction(powerAction);
break;
case "TransferStatOT":
case TransferStatOT:
apa = new TransferStatOTPowerAction(powerAction, effects);
break;
case "TransferStat":
case TransferStat:
apa = new TransferStatPowerAction(powerAction, effects);
break;
case "Teleport":
case Teleport:
apa = new TeleportPowerAction(powerAction);
break;
case "TreeChoke":
case TreeChoke:
apa = new TreeChokePowerAction(powerAction);
break;
case "Block":
case Block:
apa = new BlockPowerAction(powerAction);
break;
case "Resurrect":
case Resurrect:
apa = new ResurrectPowerAction(powerAction);
break;
case "ClearAggro":
apa = new ClearAggroPowerAction(powerAction);
break;
case "ClaimMine":
case ClaimMine:
apa = new ClaimMinePowerAction(powerAction);
break;
case "Recall":
case Recall:
apa = new RecallPowerAction(powerAction);
break;
case "SpireDisable":
case SpireDisable:
apa = new SpireDisablePowerAction(powerAction);
break;
case "Steal":
case Steal:
apa = new StealPowerAction(powerAction);
break;
case "Summon":
case Summon:
apa = new SummonPowerAction(powerAction);
break;
case "RunegateTeleport":
case RunegateTeleport:
apa = new RunegateTeleportPowerAction(powerAction);
break;
case "OpenGate":
apa = new OpenGatePowerAction(powerAction);
break;
}
PowersManager.powerActionsByIDString.put(IDString, apa);
}