From 6a336517828000c1501de3347e5aff148ee4ff52 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Tue, 27 Feb 2024 15:47:04 -0500 Subject: [PATCH] More parsing work. --- src/engine/objects/ItemTemplate.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/engine/objects/ItemTemplate.java b/src/engine/objects/ItemTemplate.java index 0cc9945b..bee69e5f 100644 --- a/src/engine/objects/ItemTemplate.java +++ b/src/engine/objects/ItemTemplate.java @@ -341,7 +341,8 @@ public class ItemTemplate { JSONObject powerActionEntry = (JSONObject) o; String power = (String) powerActionEntry.get("power_type"); 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()}; item_power_action.put(power, power_arguments); }