From 23bf491d4babde92596084e1a51fb9446f71327b Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sat, 17 Aug 2024 16:16:00 -0400 Subject: [PATCH] More enum work. --- src/engine/mbEnums.java | 7 +++++++ src/engine/wpak/PowerEntry.java | 2 +- src/engine/wpak/PowersParser.java | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/engine/mbEnums.java b/src/engine/mbEnums.java index ac8cb0ad..18648b19 100644 --- a/src/engine/mbEnums.java +++ b/src/engine/mbEnums.java @@ -3035,5 +3035,12 @@ public class mbEnums { MANA, STAMINA; } + + public enum AreaType { + NONE, + POINTBLANK, + SPHERE, + CONE; + } } diff --git a/src/engine/wpak/PowerEntry.java b/src/engine/wpak/PowerEntry.java index 8bc62d21..b2006825 100644 --- a/src/engine/wpak/PowerEntry.java +++ b/src/engine/wpak/PowerEntry.java @@ -18,7 +18,7 @@ public class PowerEntry { public ArrayList powers = new ArrayList<>(); public mbEnums.PowerTargetType target_type; public int range; - public String areaType; + public mbEnums.AreaType areaType; public int areaRange; public String excludeType; public mbEnums.CostType costType; diff --git a/src/engine/wpak/PowersParser.java b/src/engine/wpak/PowersParser.java index b0e7ec01..d66b843c 100644 --- a/src/engine/wpak/PowersParser.java +++ b/src/engine/wpak/PowersParser.java @@ -88,7 +88,7 @@ public class PowersParser { powerEntry.target_type = mbEnums.PowerTargetType.valueOf(nextValue); powerEntry.range = Integer.parseInt(iterator.next()); - powerEntry.areaType = iterator.next(); + powerEntry.areaType = mbEnums.AreaType.valueOf(iterator.next()); powerEntry.areaRange = Integer.parseInt(iterator.next()); powerEntry.excludeType = iterator.next(); powerEntry.costType = mbEnums.CostType.valueOf(iterator.next());