diff --git a/src/engine/wpak/PowersParser.java b/src/engine/wpak/PowersParser.java index 4f22e244..d6515a04 100644 --- a/src/engine/wpak/PowersParser.java +++ b/src/engine/wpak/PowersParser.java @@ -61,7 +61,8 @@ public class PowersParser { StringBuilder powerBuilder = new StringBuilder(); String conditionString; String powerString; - + java.util.Iterator iterator; + java.util.Iterator argumentIterator; int endPos = 0; // Separate out any conditions from the power data @@ -95,7 +96,7 @@ public class PowersParser { while (matcher.find()) powerHeader.add(matcher.group().trim()); - java.util.Iterator iterator = powerHeader.iterator(); + iterator = powerHeader.iterator(); powerEntry.power_id = iterator.next(); powerEntry.power = iterator.next().replaceAll("\"", ""); @@ -202,10 +203,14 @@ public class PowersParser { while (matcher1.find()) arguments.add(matcher1.group().trim()); - equipmentPreReq.slot = mbEnums.EquipSlotType.valueOf(arguments.get(0)); - equipmentPreReq.skill = arguments.get(1).replaceAll("\"", ""); - equipmentPreReq.level = Integer.parseInt(arguments.get(2)); - powerEntry.equipmentPreReq = equipmentPreReq; + argumentIterator = arguments.iterator(); + + while (argumentIterator.hasNext()) { + equipmentPreReq.slot = mbEnums.EquipSlotType.valueOf(arguments.get(0)); + equipmentPreReq.skill = arguments.get(1).replaceAll("\"", ""); + equipmentPreReq.required = Integer.parseInt(arguments.get(2)); + powerEntry.equipmentPreReq.add(equipmentPreReq); + } break; case "CANCASTWHILEMOVING": powerEntry.canCastWhileMoving = Boolean.parseBoolean(lineValues.get(1).trim()); diff --git a/src/engine/wpak/data/EquipmentPreReq.java b/src/engine/wpak/data/EquipmentPreReq.java index a5276d61..443a1633 100644 --- a/src/engine/wpak/data/EquipmentPreReq.java +++ b/src/engine/wpak/data/EquipmentPreReq.java @@ -14,6 +14,6 @@ public class EquipmentPreReq { public mbEnums.EquipSlotType slot; public String skill; - public int level; + public int required; } diff --git a/src/engine/wpak/data/PowerEntry.java b/src/engine/wpak/data/PowerEntry.java index 3ef86686..6a240726 100644 --- a/src/engine/wpak/data/PowerEntry.java +++ b/src/engine/wpak/data/PowerEntry.java @@ -50,7 +50,7 @@ public class PowerEntry { public boolean canCastWhileMoving = false; public boolean bladeTrails = false; public ArrayList effectPreReqs = new ArrayList<>(); - public EquipmentPreReq equipmentPreReq; + public ArrayList equipmentPreReq = new ArrayList<>(); public EnumSet monsterRestricts = EnumSet.noneOf(mbEnums.MonsterType.class); public EnumSet monsterPrereqs = EnumSet.noneOf(mbEnums.MonsterType.class); public boolean shouldCheckPath = false;