From 08ac0b8d8da5eee0ac5f7ff1b13bfef299f9394e Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sat, 17 Aug 2024 16:20:21 -0400 Subject: [PATCH] More enum work. --- src/engine/mbEnums.java | 12 ++++++++++++ src/engine/wpak/PowerEntry.java | 2 +- src/engine/wpak/PowersParser.java | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/engine/mbEnums.java b/src/engine/mbEnums.java index 18648b19..71f10564 100644 --- a/src/engine/mbEnums.java +++ b/src/engine/mbEnums.java @@ -3042,5 +3042,17 @@ public class mbEnums { SPHERE, CONE; } + + public enum ExcludeType { + NONE, + CASTER, + GROUP, + GUILD, + NATION, + PLAYERS, + ALLBUTGROUP, + ALLBUTPETS; + + } } diff --git a/src/engine/wpak/PowerEntry.java b/src/engine/wpak/PowerEntry.java index b2006825..7c357cef 100644 --- a/src/engine/wpak/PowerEntry.java +++ b/src/engine/wpak/PowerEntry.java @@ -20,7 +20,7 @@ public class PowerEntry { public int range; public mbEnums.AreaType areaType; public int areaRange; - public String excludeType; + public mbEnums.ExcludeType excludeType; public mbEnums.CostType costType; public float cost; public float difficulty; diff --git a/src/engine/wpak/PowersParser.java b/src/engine/wpak/PowersParser.java index d66b843c..060f2146 100644 --- a/src/engine/wpak/PowersParser.java +++ b/src/engine/wpak/PowersParser.java @@ -90,7 +90,7 @@ public class PowersParser { powerEntry.range = Integer.parseInt(iterator.next()); powerEntry.areaType = mbEnums.AreaType.valueOf(iterator.next()); powerEntry.areaRange = Integer.parseInt(iterator.next()); - powerEntry.excludeType = iterator.next(); + powerEntry.excludeType = mbEnums.ExcludeType.valueOf(iterator.next()); powerEntry.costType = mbEnums.CostType.valueOf(iterator.next()); powerEntry.cost = Float.parseFloat(iterator.next()); powerEntry.difficulty = Float.parseFloat(iterator.next());