From 242984ffafeabb27749579c1c91c475e9f2f377a Mon Sep 17 00:00:00 2001 From: MagicBot Date: Tue, 2 Apr 2024 14:44:50 -0400 Subject: [PATCH] Rune attribute and max attribute adjusts parsed --- src/engine/objects/ItemTemplate.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/engine/objects/ItemTemplate.java b/src/engine/objects/ItemTemplate.java index 2713435f..a0883504 100644 --- a/src/engine/objects/ItemTemplate.java +++ b/src/engine/objects/ItemTemplate.java @@ -418,6 +418,16 @@ public class ItemTemplate { rune_attr_adj.put(attributeType, attributeValue); } + JSONArray max_attr_adj_json = (JSONArray) jsonObject.get("rune_max_attr_adj"); + + for (Object attributeEntry : max_attr_adj_json) { + JSONObject attribute = (JSONObject) attributeEntry; + String typeString = (String) attribute.get("attr_type"); + Enum.AttributeType attributeType = Enum.AttributeType.valueOf(typeString); + int attributeValue = ((Long) attribute.get("attr_value")).intValue(); + rune_max_attr_adj.put(attributeType, attributeValue); + } + }