Proper parsing of power grants
This commit is contained in:
@@ -356,13 +356,11 @@ public class ItemTemplate {
|
|||||||
|
|
||||||
for (Object grantArrayEntry : powerGrantsArray) {
|
for (Object grantArrayEntry : powerGrantsArray) {
|
||||||
JSONObject powerGrantEntry = (JSONObject) grantArrayEntry;
|
JSONObject powerGrantEntry = (JSONObject) grantArrayEntry;
|
||||||
JSONArray powerGrants = (JSONArray) powerGrantEntry.get("power_granted_powers");
|
String power_type = (String) powerGrantEntry.get("power_type");
|
||||||
|
int power_value = ((Long) powerGrantEntry.get("power_value")).intValue();
|
||||||
for (Object grantedPowerEntry : powerGrants) {
|
item_power_grant.put(power_type, power_value);
|
||||||
JSONObject grantedPower = (JSONObject) grantedPowerEntry;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONArray item_power_actions = (JSONArray) jsonObject.get("item_power_action");
|
JSONArray item_power_actions = (JSONArray) jsonObject.get("item_power_action");
|
||||||
|
|||||||
Reference in New Issue
Block a user