Proper parsing of power grants

This commit is contained in:
2024-04-01 16:32:17 -04:00
parent 5a1027c611
commit cc02be95f3
+4 -6
View File
@@ -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");