diff --git a/src/engine/Enum.java b/src/engine/Enum.java index 3fde661b..9da4fa22 100644 --- a/src/engine/Enum.java +++ b/src/engine/Enum.java @@ -1354,6 +1354,16 @@ public class Enum { } } + public enum MovementType { + WALK, + RUN, + COMBATWALK, + COMBATRUN, + FLYWALK, + FLYRUN, + SWIM; + } + public enum SexType { NONE, MALE, diff --git a/src/engine/objects/ItemTemplate.java b/src/engine/objects/ItemTemplate.java index 3f5720e1..aab6cca2 100644 --- a/src/engine/objects/ItemTemplate.java +++ b/src/engine/objects/ItemTemplate.java @@ -116,7 +116,7 @@ public class ItemTemplate { public int rune_attack; public int rune_defense; public int rune_level; - public HashMap rune_speed = new HashMap<>(); + public HashMap rune_speed = new HashMap<>(); public int rune_group_type; public boolean rune_group_is_faction = false; public boolean rune_group_is_guild = false; @@ -455,6 +455,24 @@ public class ItemTemplate { rune_pracs_per_level = ((Long) jsonObject.get("rune_pracs_per_level")).intValue(); rune_exp_req_to_level = ((Double) jsonObject.get("rune_exp_req_to_level")).floatValue(); rune_sex = Enum.SexType.valueOf((String) jsonObject.get("rune_sex")); + rune_class_icon = ((Long) jsonObject.get("rune_class_icon")).intValue(); + rune_health = ((Double) jsonObject.get("rune_health")).floatValue(); + rune_mana = ((Long) jsonObject.get("rune_mana")).intValue(); + rune_stamina = ((Long) jsonObject.get("rune_stamina")).intValue(); + rune_min_damage = ((Double) jsonObject.get("rune_min_damage")).floatValue(); + rune_max_damage = ((Double) jsonObject.get("rune_max_damage")).floatValue(); + rune_attack = ((Long) jsonObject.get("rune_attack")).intValue(); + rune_defense = ((Long) jsonObject.get("rune_defense")).intValue(); + rune_level = ((Long) jsonObject.get("rune_level")).intValue(); + + JSONObject rune_speed_json = (JSONObject) jsonObject.get("rune_speed"); + + for (Object key : rune_speed_json.keySet()) { + Enum.MovementType movementType = Enum.MovementType.valueOf((String) key); + float speed = ((Double) rune_speed_json.get(key)).floatValue(); + rune_speed.put(movementType, speed); + } + JSONArray attr_adj_json = (JSONArray) jsonObject.get("rune_attr_adj");