From fcbb9b0cf1abc843fac9047f7ab07de561454a32 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 22 Apr 2024 12:56:01 -0400 Subject: [PATCH] Update to sparsetype parsing --- src/engine/objects/ItemTemplate.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/engine/objects/ItemTemplate.java b/src/engine/objects/ItemTemplate.java index 95174741..8f61fb9d 100644 --- a/src/engine/objects/ItemTemplate.java +++ b/src/engine/objects/ItemTemplate.java @@ -545,9 +545,10 @@ public class ItemTemplate { JSONObject rune_sparse_json = jsonObject.getJSONObject("rune_sparse_data"); - for (String sparseType : rune_sparse_json.keySet()) { - Object sparseValue = rune_sparse_json.getString(sparseType); - rune_sparse_data.put(sparseType, sparseValue.toString()); + for (Object key : rune_sparse_json.keySet()) { + String sparseType = key.toString(); + String sparseValue = (String) rune_sparse_json.get(sparseType); + rune_sparse_data.put(sparseType, sparseValue); } JSONArray skill_adj_json = (JSONArray) jsonObject.get("rune_skill_adj");