rune_speed parsed
This commit is contained in:
@@ -1354,6 +1354,16 @@ public class Enum {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum MovementType {
|
||||||
|
WALK,
|
||||||
|
RUN,
|
||||||
|
COMBATWALK,
|
||||||
|
COMBATRUN,
|
||||||
|
FLYWALK,
|
||||||
|
FLYRUN,
|
||||||
|
SWIM;
|
||||||
|
}
|
||||||
|
|
||||||
public enum SexType {
|
public enum SexType {
|
||||||
NONE,
|
NONE,
|
||||||
MALE,
|
MALE,
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ public class ItemTemplate {
|
|||||||
public int rune_attack;
|
public int rune_attack;
|
||||||
public int rune_defense;
|
public int rune_defense;
|
||||||
public int rune_level;
|
public int rune_level;
|
||||||
public HashMap<String, Float> rune_speed = new HashMap<>();
|
public HashMap<Enum.MovementType, Float> rune_speed = new HashMap<>();
|
||||||
public int rune_group_type;
|
public int rune_group_type;
|
||||||
public boolean rune_group_is_faction = false;
|
public boolean rune_group_is_faction = false;
|
||||||
public boolean rune_group_is_guild = 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_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_exp_req_to_level = ((Double) jsonObject.get("rune_exp_req_to_level")).floatValue();
|
||||||
rune_sex = Enum.SexType.valueOf((String) jsonObject.get("rune_sex"));
|
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");
|
JSONArray attr_adj_json = (JSONArray) jsonObject.get("rune_attr_adj");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user