Browse Source

More PowerEntry parsing work

feature-config-parsing2
MagicBot 4 months ago
parent
commit
4c7421cd62
  1. 5
      src/engine/wpak/PowerEntry.java
  2. 6
      src/engine/wpak/PowersParser.java

5
src/engine/wpak/PowerEntry.java

@ -18,4 +18,9 @@ public class PowerEntry {
public String target_type; public String target_type;
public int range; public int range;
public String radiusType; public String radiusType;
public int radius;
public String groupReq;
public String costType;
public int cost;
} }

6
src/engine/wpak/PowersParser.java

@ -64,7 +64,11 @@ public class PowersParser {
powerEntry.skill_name = powerHeader.get(4); powerEntry.skill_name = powerHeader.get(4);
powerEntry.target_type = powerHeader.get(5); powerEntry.target_type = powerHeader.get(5);
powerEntry.range = Integer.parseInt(powerHeader.get(6)); powerEntry.range = Integer.parseInt(powerHeader.get(6));
powerEntry.radiusType = powerHeader.get(2); powerEntry.radiusType = powerHeader.get(7);
powerEntry.radius = Integer.parseInt(powerHeader.get(8));
powerEntry.groupReq = powerHeader.get(7);
powerEntry.costType = powerHeader.get(7);
powerEntry.cost = Integer.parseInt(powerHeader.get(8));
for (int x = 2; x < powerEntries.length; x++) { for (int x = 2; x < powerEntries.length; x++) {

Loading…
Cancel
Save