forked from MagicBane/Server
More parsing work.
This commit is contained in:
@@ -341,7 +341,8 @@ public class ItemTemplate {
|
|||||||
JSONObject powerActionEntry = (JSONObject) o;
|
JSONObject powerActionEntry = (JSONObject) o;
|
||||||
String power = (String) powerActionEntry.get("power_type");
|
String power = (String) powerActionEntry.get("power_type");
|
||||||
JSONArray power_actions = (JSONArray) powerActionEntry.get("power_actions");
|
JSONArray power_actions = (JSONArray) powerActionEntry.get("power_actions");
|
||||||
JSONObject power_args = (JSONObject) power_actions.get(0);
|
JSONObject argument_entry = (JSONObject) power_actions.get(0);
|
||||||
|
JSONArray power_args = (JSONArray) argument_entry.get("power_arguments");
|
||||||
int[] power_arguments = {((Long) power_args.get(0)).intValue(), ((Long) power_args.get(1)).intValue()};
|
int[] power_arguments = {((Long) power_args.get(0)).intValue(), ((Long) power_args.get(1)).intValue()};
|
||||||
item_power_action.put(power, power_arguments);
|
item_power_action.put(power, power_arguments);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user