Browse Source

Def rating is an int

combat-2
MagicBot 9 months ago
parent
commit
a7b3fba018
  1. 4
      src/engine/objects/ItemTemplate.java

4
src/engine/objects/ItemTemplate.java

@ -47,7 +47,7 @@ public class ItemTemplate {
public EnumSet<Enum.CharacterSkills> item_skill_mastery_used = EnumSet.noneOf(Enum.CharacterSkills.class); public EnumSet<Enum.CharacterSkills> item_skill_mastery_used = EnumSet.noneOf(Enum.CharacterSkills.class);
// Armor specific fields // Armor specific fields
public float item_bulk_factor; public float item_bulk_factor;
public float item_defense_rating; public int item_defense_rating;
// Weapon specific fields // Weapon specific fields
public float item_weapon_wepspeed; public float item_weapon_wepspeed;
public float item_weapon_max_range; public float item_weapon_max_range;
@ -153,7 +153,7 @@ public class ItemTemplate {
if (item_type.equals(Enum.ItemType.ARMOR)) { 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();
item_defense_rating = ((Double) jsonObject.get("item_defense_rating")).floatValue(); item_defense_rating = ((Long) jsonObject.get("item_defense_rating")).intValue();
} }
if (item_type.equals(Enum.ItemType.WEAPON)) { if (item_type.equals(Enum.ItemType.WEAPON)) {

Loading…
Cancel
Save