Browse Source

More enum work.

feature-config-parsing2
MagicBot 3 months ago
parent
commit
b2a8fe357e
  1. 15
      src/engine/mbEnums.java
  2. 4
      src/engine/wpak/PowerEntry.java
  3. 4
      src/engine/wpak/PowersParser.java

15
src/engine/mbEnums.java

@ -3052,7 +3052,22 @@ public class mbEnums {
PLAYERS, PLAYERS,
ALLBUTGROUP, ALLBUTGROUP,
ALLBUTPETS; ALLBUTPETS;
}
public enum CastingModeType {
NONE,
COMBAT,
NONCOMBAT,
BOTH;
}
public enum TargetSelectType {
NONE,
CLICK,
GROUP,
GUILD,
NEARBYMOBS,
NAME;
} }
} }

4
src/engine/wpak/PowerEntry.java

@ -29,8 +29,8 @@ public class PowerEntry {
public float release_time; public float release_time;
public float recycle_time; public float recycle_time;
public int hitRollYN; public int hitRollYN;
public String castingMode; public mbEnums.CastingModeType castingMode;
public int initAmin; public int initAmin;
public int releaseAnim; public int releaseAnim;
public String targetSelect; public mbEnums.TargetSelectType targetSelect;
} }

4
src/engine/wpak/PowersParser.java

@ -99,10 +99,10 @@ public class PowersParser {
powerEntry.release_time = Float.parseFloat(iterator.next()); powerEntry.release_time = Float.parseFloat(iterator.next());
powerEntry.recycle_time = Float.parseFloat(iterator.next()); powerEntry.recycle_time = Float.parseFloat(iterator.next());
powerEntry.hitRollYN = Integer.parseInt(iterator.next()); powerEntry.hitRollYN = Integer.parseInt(iterator.next());
powerEntry.castingMode = iterator.next(); powerEntry.castingMode = mbEnums.CastingModeType.valueOf(iterator.next());
powerEntry.initAmin = Integer.parseInt(iterator.next()); powerEntry.initAmin = Integer.parseInt(iterator.next());
powerEntry.releaseAnim = Integer.parseInt(iterator.next()); powerEntry.releaseAnim = Integer.parseInt(iterator.next());
powerEntry.targetSelect = iterator.next(); powerEntry.targetSelect = mbEnums.TargetSelectType.valueOf(iterator.next());
for (int x = 2; x < powerEntries.length; x++) { for (int x = 2; x < powerEntries.length; x++) {

Loading…
Cancel
Save