Browse Source

More enum work.

feature-config-parsing2
MagicBot 3 months ago
parent
commit
08ac0b8d8d
  1. 12
      src/engine/mbEnums.java
  2. 2
      src/engine/wpak/PowerEntry.java
  3. 2
      src/engine/wpak/PowersParser.java

12
src/engine/mbEnums.java

@ -3042,5 +3042,17 @@ public class mbEnums { @@ -3042,5 +3042,17 @@ public class mbEnums {
SPHERE,
CONE;
}
public enum ExcludeType {
NONE,
CASTER,
GROUP,
GUILD,
NATION,
PLAYERS,
ALLBUTGROUP,
ALLBUTPETS;
}
}

2
src/engine/wpak/PowerEntry.java

@ -20,7 +20,7 @@ public class PowerEntry { @@ -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;

2
src/engine/wpak/PowersParser.java

@ -90,7 +90,7 @@ public class PowersParser { @@ -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());

Loading…
Cancel
Save