Browse Source

Proper parsing of power grants

combat-2
MagicBot 8 months ago
parent
commit
cc02be95f3
  1. 10
      src/engine/objects/ItemTemplate.java

10
src/engine/objects/ItemTemplate.java

@ -356,13 +356,11 @@ public class ItemTemplate { @@ -356,13 +356,11 @@ public class ItemTemplate {
for (Object grantArrayEntry : powerGrantsArray) {
JSONObject powerGrantEntry = (JSONObject) grantArrayEntry;
JSONArray powerGrants = (JSONArray) powerGrantEntry.get("power_granted_powers");
for (Object grantedPowerEntry : powerGrants) {
JSONObject grantedPower = (JSONObject) grantedPowerEntry;
}
String power_type = (String) powerGrantEntry.get("power_type");
int power_value = ((Long) powerGrantEntry.get("power_value")).intValue();
item_power_grant.put(power_type, power_value);
}
}
JSONArray item_power_actions = (JSONArray) jsonObject.get("item_power_action");

Loading…
Cancel
Save