More parsing work

This commit is contained in:
2024-02-27 15:35:03 -05:00
parent 22da19085d
commit 808a60c86c
+4 -4
View File
@@ -340,10 +340,10 @@ public class ItemTemplate {
for (Object o : item_power_actions) { for (Object o : item_power_actions) {
JSONObject powerActionEntry = (JSONObject) o; JSONObject powerActionEntry = (JSONObject) o;
String power = (String) powerActionEntry.get("power_type"); String power = (String) powerActionEntry.get("power_type");
JSONObject power_actions = (JSONObject) powerActionEntry.get("power_actions"); JSONArray power_actions = (JSONArray) 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()}; //int[] power_arguments = {((Long) args.get(0)).intValue(), ((Long) args.get(1)).intValue()};
item_power_action.put(power, power_arguments); item_power_action.put(power, 1);
} }
} catch (Exception e) { } catch (Exception e) {