From 1043c84b9d4f63f91a2a12ae8bf8c510829eccf0 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Thu, 4 Apr 2024 11:34:02 -0400 Subject: [PATCH] Both sparse fields parsed --- src/engine/objects/ItemTemplate.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/engine/objects/ItemTemplate.java b/src/engine/objects/ItemTemplate.java index 69197464..800baedb 100644 --- a/src/engine/objects/ItemTemplate.java +++ b/src/engine/objects/ItemTemplate.java @@ -127,7 +127,7 @@ public class ItemTemplate { public int rune_group_role_set; public boolean rune_renderable = false; public int rune_natural_power_attack; - public HashMap rune_sparse_data = new HashMap<>(); + public HashMap rune_sparse_data = new HashMap<>(); public ItemTemplate(JSONObject jsonObject) { @@ -169,7 +169,7 @@ public class ItemTemplate { for (Object key : obj_sparse_json.keySet()) { String sparseType = (String) key; - String sparseValue = (String) obj_sparse_json.get(key); + String sparseValue = (String) obj_sparse_json.get(sparseType); obj_sparse_data.put(sparseType, sparseValue); } @@ -499,7 +499,7 @@ public class ItemTemplate { for (Object key : rune_sparse_json.keySet()) { String sparseType = (String) key; - int sparseValue = ((Long) rune_sparse_json.get("sparseType")).intValue(); + String sparseValue = (String) rune_sparse_json.get(sparseType); rune_sparse_data.put(sparseType, sparseValue); }