Browse Source

Skills and mastery work.

combat-2
MagicBot 9 months ago
parent
commit
5e6d298ca0
  1. 20
      src/engine/objects/ItemTemplate.java

20
src/engine/objects/ItemTemplate.java

@ -105,22 +105,14 @@ public class ItemTemplate {
item_render_object_female = ((Long) jsonObject.get("item_render_object_female")).intValue(); item_render_object_female = ((Long) jsonObject.get("item_render_object_female")).intValue();
item_health_full = ((Double) jsonObject.get("item_health_full")).floatValue(); item_health_full = ((Double) jsonObject.get("item_health_full")).floatValue();
Object skills_used = jsonObject.get("item_skill_used"); String skills_used = (String) jsonObject.get("item_skill_used");
if (((JSONObject) jsonObject.get("item_skill_used")).containsValue(0) == false) if (skills_used.length() > 1)
for (Object o : (JSONArray) jsonObject.get("item_skill_used")) { item_skill_used.add(Enum.CharacterSkills.valueOf(skills_used));
String skilString = ((String) o).replaceAll("\\s", "");
Enum.CharacterSkills characterSkill = Enum.CharacterSkills.valueOf(skilString);
item_skill_used.add(characterSkill);
}
Object mastery_used = jsonObject.get("item_skill_mastery_used"); String mastery_used = (String) jsonObject.get("item_skill_mastery_used");
if ((int) mastery_used != 0) if (mastery_used.length() > 1)
for (Object o : (JSONArray) mastery_used) { item_skill_mastery_used.add(Enum.CharacterSkills.valueOf(mastery_used));
String masteryString = ((String) o).replaceAll("\\s", "");
Enum.CharacterSkills masterySkill = Enum.CharacterSkills.valueOf(masteryString);
item_skill_mastery_used.add(masterySkill);
}
} }
} }

Loading…
Cancel
Save