From e4e8086e41462d526aa93fcfe4bef7ffdd216686 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sat, 17 Aug 2024 16:07:47 -0400 Subject: [PATCH] More Enum work --- src/engine/wpak/PowerEntry.java | 2 +- src/engine/wpak/PowersParser.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/engine/wpak/PowerEntry.java b/src/engine/wpak/PowerEntry.java index 23c480e2..8bc62d21 100644 --- a/src/engine/wpak/PowerEntry.java +++ b/src/engine/wpak/PowerEntry.java @@ -16,7 +16,7 @@ public class PowerEntry { public String power_id; public String power; public ArrayList powers = new ArrayList<>(); - public String target_type; + public mbEnums.PowerTargetType target_type; public int range; public String areaType; public int areaRange; diff --git a/src/engine/wpak/PowersParser.java b/src/engine/wpak/PowersParser.java index 48be94af..5a11ab1a 100644 --- a/src/engine/wpak/PowersParser.java +++ b/src/engine/wpak/PowersParser.java @@ -86,9 +86,9 @@ public class PowersParser { power.icon = Integer.parseInt(iterator.next()); power.powerBase = iterator.next().replaceAll("\"", ""); powerEntry.powers.add(power); - powerEntry.target_type = iterator.next(); + powerEntry.target_type = mbEnums.PowerTargetType.valueOf(iterator.next()); } else - powerEntry.target_type = nextValue; + powerEntry.target_type = mbEnums.PowerTargetType.valueOf(nextValue); powerEntry.range = Integer.parseInt(iterator.next()); powerEntry.areaType = iterator.next();