forked from MagicBane/Server
Wrapped in armor test
This commit is contained in:
@@ -139,13 +139,12 @@ public class ItemTemplate {
|
|||||||
|
|
||||||
item_parry_anim_id = ((Long) jsonObject.get("item_parry_anim_id")).intValue();
|
item_parry_anim_id = ((Long) jsonObject.get("item_parry_anim_id")).intValue();
|
||||||
|
|
||||||
// Item Type == ARMOR?
|
// Fields only present for ARMOR
|
||||||
|
|
||||||
if (jsonObject.containsValue("item_bulk_factor"))
|
if (item_type.equals(Enum.ItemType.ARMOR)) {
|
||||||
item_bulk_factor = ((Double) jsonObject.get("item_bulk_factor")).floatValue();
|
item_bulk_factor = ((Double) jsonObject.get("item_bulk_factor")).floatValue();
|
||||||
|
|
||||||
if (jsonObject.containsValue("item_defense_rating"))
|
|
||||||
item_defense_rating = ((Double) jsonObject.get("item_defense_rating")).floatValue();
|
item_defense_rating = ((Double) jsonObject.get("item_defense_rating")).floatValue();
|
||||||
|
}
|
||||||
|
|
||||||
JSONArray itemflags = (JSONArray) jsonObject.get("item_flags");
|
JSONArray itemflags = (JSONArray) jsonObject.get("item_flags");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user