From 64e780744dd5949761c03909655346a3ec3a846b Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 1 Apr 2024 16:23:54 -0400 Subject: [PATCH] Proper parsing of power grants --- src/engine/objects/ItemTemplate.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/engine/objects/ItemTemplate.java b/src/engine/objects/ItemTemplate.java index f30683fc..22831a8c 100644 --- a/src/engine/objects/ItemTemplate.java +++ b/src/engine/objects/ItemTemplate.java @@ -356,13 +356,8 @@ public class ItemTemplate { for (Object grantArrayEntry : powerGrantsArray) { JSONObject powerGrantEntry = (JSONObject) grantArrayEntry; - JSONObject powerGrant = (JSONObject) powerGrantEntry.get("power_granted_powers"); + JSONArray powerGrants = (JSONArray) powerGrantEntry.get("power_granted_powers"); - for (Object key : powerGrant.keySet()) { - String powerString = (String) key; - int powerLevel = ((Long) powerGrant.get(key)).intValue(); - item_power_grant.put(powerString, powerLevel); - } } }