From 2bc872e9d9d19b2a52e0f06d7034e896ea47898e Mon Sep 17 00:00:00 2001 From: MagicBot Date: Tue, 20 Aug 2024 18:18:21 -0400 Subject: [PATCH] TrackEntry pojo created. --- src/engine/wpak/PowerActionParser.java | 11 +++++++++++ src/engine/wpak/data/TrackEntry.java | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/engine/wpak/PowerActionParser.java b/src/engine/wpak/PowerActionParser.java index f18f8869..3f598ff2 100644 --- a/src/engine/wpak/PowerActionParser.java +++ b/src/engine/wpak/PowerActionParser.java @@ -13,6 +13,7 @@ import engine.mbEnums; import engine.wpak.data.EffectDescription; import engine.wpak.data.PowerActionEntry; import engine.wpak.data.StatTransfer; +import engine.wpak.data.TrackEntry; import org.pmw.tinylog.Logger; import java.io.IOException; @@ -59,6 +60,7 @@ public class PowerActionParser { PowerActionEntry powerActionEntry = new PowerActionEntry(); EffectDescription effectDescription; StatTransfer statTransfer; + TrackEntry trackEntry; try { // Remove all lines that contain a # and leading/trailing blank lines @@ -158,6 +160,15 @@ public class PowerActionParser { case "SetItemFlag": powerActionEntry.itemFlag = mbEnums.ItemFlags.valueOf(headerIterator.next()); break; + case "Track": + trackEntry = new TrackEntry(); + trackEntry.action_id = headerIterator.next(); + trackEntry.unknown1 = Boolean.parseBoolean(headerIterator.next()); + trackEntry.unknown2 = Boolean.parseBoolean(headerIterator.next()); + trackEntry.type = headerIterator.next(); + trackEntry.min = Integer.parseInt(headerIterator.next()); + trackEntry.max = Integer.parseInt(headerIterator.next()); + break; case "Recall": // No arguments for these tags or not parsed case "Teleport": case "TreeChoke": diff --git a/src/engine/wpak/data/TrackEntry.java b/src/engine/wpak/data/TrackEntry.java index 96ca0139..d5161795 100644 --- a/src/engine/wpak/data/TrackEntry.java +++ b/src/engine/wpak/data/TrackEntry.java @@ -11,8 +11,8 @@ package engine.wpak.data; public class TrackEntry { public String action_id; - public int unknown1; - public int unknown2; + public Boolean unknown1; + public Boolean unknown2; public String type; public int min; public int max;