Browse Source

Type selection work.

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

4
src/engine/objects/ItemTemplate.java

@ -107,8 +107,8 @@ public class ItemTemplate {
Object skills_used = jsonObject.get("item_skill_used"); Object skills_used = jsonObject.get("item_skill_used");
if (skills_used.equals(0) == false) if (((JSONObject) jsonObject.get("item_skill_used")).containsValue(0) == false)
for (Object o : (JSONArray) skills_used) { for (Object o : (JSONArray) jsonObject.get("item_skill_used")) {
String skilString = ((String) o).replaceAll("\\s", ""); String skilString = ((String) o).replaceAll("\\s", "");
Enum.CharacterSkills characterSkill = Enum.CharacterSkills.valueOf(skilString); Enum.CharacterSkills characterSkill = Enum.CharacterSkills.valueOf(skilString);
item_skill_used.add(characterSkill); item_skill_used.add(characterSkill);

Loading…
Cancel
Save