From 75f11deee12e03933257ac8bef9a1e16a78079e4 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 1 Apr 2024 16:20:03 -0400 Subject: [PATCH] Proper parsing of power grants --- src/engine/objects/ItemTemplate.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/engine/objects/ItemTemplate.java b/src/engine/objects/ItemTemplate.java index cc180f04..79449a1c 100644 --- a/src/engine/objects/ItemTemplate.java +++ b/src/engine/objects/ItemTemplate.java @@ -354,8 +354,9 @@ public class ItemTemplate { if (powerGrantsArray.isEmpty() == false) { - for (Object grantEntry : powerGrantsArray) { - JSONObject powerGrant = (JSONObject) grantEntry; + for (Object grantArrayEntry : powerGrantsArray) { + JSONObject powerGrantEntry = (JSONObject) grantArrayEntry; + JSONObject powerGrant = (JSONObject) powerGrantEntry.get("granted_powers"); for (Object key : powerGrant.keySet()) { String powerString = (String) key;