forked from MagicBane/Server
New branch more progress
This commit is contained in:
@@ -156,6 +156,8 @@ public class ItemTemplate {
|
||||
item_defense_rating = ((Long) jsonObject.get("item_defense_rating")).intValue();
|
||||
}
|
||||
|
||||
// Fields only present for WEAPON
|
||||
|
||||
if (item_type.equals(Enum.ItemType.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");
|
||||
|
||||
// Need a pojo for this or a PAIR<>
|
||||
|
||||
for (Object o : weapon_damage) {
|
||||
JSONObject damage_entry = (JSONObject) o;
|
||||
item_weapon_damage_type = Enum.SourceType.valueOf(((String) damage_entry.get("damage_type")).toUpperCase());
|
||||
|
||||
Reference in New Issue
Block a user