From cd80b9f228bd44418683ca2638cef1a5e16b3baa Mon Sep 17 00:00:00 2001 From: MagicBot Date: Tue, 20 Aug 2024 15:05:47 -0400 Subject: [PATCH] PowerAction parsing work. --- src/engine/wpak/PowerActionParser.java | 8 ++++---- src/engine/wpak/data/PowerActionEntry.java | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/engine/wpak/PowerActionParser.java b/src/engine/wpak/PowerActionParser.java index f04b3f44..4fd34b55 100644 --- a/src/engine/wpak/PowerActionParser.java +++ b/src/engine/wpak/PowerActionParser.java @@ -86,11 +86,12 @@ public class PowerActionParser { effectDescription.effect_id = headerIterator.next(); powerActionEntry.effects.add(effectDescription); case "CreateMob": - powerActionEntry.arg1 = Integer.parseInt(headerIterator.next()); - powerActionEntry.arg2 = Integer.parseInt(headerIterator.next()); + powerActionEntry.petLevel = Integer.parseInt(headerIterator.next()); + powerActionEntry.petRace = Integer.parseInt(headerIterator.next()); break; case "ApplyEffect": - case "DeferredPower ": + case "DeferredPower": + case "DirectDamage": while (headerIterator.hasNext()) { effectDescription = new EffectDescription(); effectDescription.effect_id = headerIterator.next(); @@ -98,7 +99,6 @@ public class PowerActionParser { powerActionEntry.effects.add(effectDescription); } break; - default: Logger.error("Unhandled type " + powerActionEntry.action_type + " for Pow4erAction: " + powerActionEntry.action_id); break; diff --git a/src/engine/wpak/data/PowerActionEntry.java b/src/engine/wpak/data/PowerActionEntry.java index d2332103..07c16a8d 100644 --- a/src/engine/wpak/data/PowerActionEntry.java +++ b/src/engine/wpak/data/PowerActionEntry.java @@ -33,7 +33,7 @@ public class PowerActionEntry { public mbEnums.DamageType damageType; public boolean applyEffectBlank = false; public boolean wearOffEffectBlank = false; - public int arg1; - public int arg2; + public int petLevel; + public int petRace; }