|
|
@ -156,6 +156,8 @@ public class ItemTemplate { |
|
|
|
item_defense_rating = ((Long) jsonObject.get("item_defense_rating")).intValue(); |
|
|
|
item_defense_rating = ((Long) jsonObject.get("item_defense_rating")).intValue(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Fields only present for WEAPON
|
|
|
|
|
|
|
|
|
|
|
|
if (item_type.equals(Enum.ItemType.WEAPON)) { |
|
|
|
if (item_type.equals(Enum.ItemType.WEAPON)) { |
|
|
|
|
|
|
|
|
|
|
|
JSONObject item_weapon = (JSONObject) jsonObject.get("item_weapon"); |
|
|
|
JSONObject item_weapon = (JSONObject) jsonObject.get("item_weapon"); |
|
|
@ -167,6 +169,8 @@ public class ItemTemplate { |
|
|
|
|
|
|
|
|
|
|
|
JSONArray weapon_damage = (JSONArray) item_weapon.get("weapon_damage"); |
|
|
|
JSONArray weapon_damage = (JSONArray) item_weapon.get("weapon_damage"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Need a pojo for this or a PAIR<>
|
|
|
|
|
|
|
|
|
|
|
|
for (Object o : weapon_damage) { |
|
|
|
for (Object o : weapon_damage) { |
|
|
|
JSONObject damage_entry = (JSONObject) o; |
|
|
|
JSONObject damage_entry = (JSONObject) o; |
|
|
|
item_weapon_damage_type = Enum.SourceType.valueOf(((String) damage_entry.get("damage_type")).toUpperCase()); |
|
|
|
item_weapon_damage_type = Enum.SourceType.valueOf(((String) damage_entry.get("damage_type")).toUpperCase()); |
|
|
|