Browse Source

More parsing work

combat-2
MagicBot 9 months ago
parent
commit
808a60c86c
  1. 8
      src/engine/objects/ItemTemplate.java

8
src/engine/objects/ItemTemplate.java

@ -340,10 +340,10 @@ public class ItemTemplate { @@ -340,10 +340,10 @@ public class ItemTemplate {
for (Object o : item_power_actions) {
JSONObject powerActionEntry = (JSONObject) o;
String power = (String) powerActionEntry.get("power_type");
JSONObject power_actions = (JSONObject) powerActionEntry.get("power_actions");
JSONArray args = (JSONArray) power_actions.get("power_arguments");
int[] power_arguments = {((Long) args.get(0)).intValue(), ((Long) args.get(1)).intValue()};
item_power_action.put(power, power_arguments);
JSONArray power_actions = (JSONArray) powerActionEntry.get("power_actions");
//int[] power_arguments = {((Long) args.get(0)).intValue(), ((Long) args.get(1)).intValue()};
item_power_action.put(power, 1);
}
} catch (Exception e) {

Loading…
Cancel
Save