From 3e6bfacd86add664fad486762f2c18c10a00e03c Mon Sep 17 00:00:00 2001 From: MagicBot Date: Thu, 4 Apr 2024 11:43:02 -0400 Subject: [PATCH] Fix for mixed type values --- src/engine/objects/ItemTemplate.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/engine/objects/ItemTemplate.java b/src/engine/objects/ItemTemplate.java index 800baedb..0fa0f54a 100644 --- a/src/engine/objects/ItemTemplate.java +++ b/src/engine/objects/ItemTemplate.java @@ -169,8 +169,8 @@ public class ItemTemplate { for (Object key : obj_sparse_json.keySet()) { String sparseType = (String) key; - String sparseValue = (String) obj_sparse_json.get(sparseType); - obj_sparse_data.put(sparseType, sparseValue); + Object sparseValue = obj_sparse_json.get(sparseType); + obj_sparse_data.put(sparseType, sparseValue.toString()); } // Reading float values @@ -499,8 +499,8 @@ public class ItemTemplate { for (Object key : rune_sparse_json.keySet()) { String sparseType = (String) key; - String sparseValue = (String) rune_sparse_json.get(sparseType); - rune_sparse_data.put(sparseType, sparseValue); + Object sparseValue = rune_sparse_json.get(sparseType); + rune_sparse_data.put(sparseType, sparseValue.toString()); } JSONArray attr_adj_json = (JSONArray) jsonObject.get("rune_attr_adj");