Browse Source

String cleanup for skill enums.

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

11
src/engine/objects/ItemTemplate.java

@ -107,12 +107,19 @@ public class ItemTemplate { @@ -107,12 +107,19 @@ public class ItemTemplate {
String skills_used = (String) jsonObject.get("item_skill_used");
if (skills_used.length() > 1)
if (skills_used.length() > 1) {
skills_used = skills_used.replaceAll("\\s", "");
skills_used = skills_used.replaceAll(",", "");
item_skill_used.add(Enum.CharacterSkills.valueOf(skills_used));
}
String mastery_used = (String) jsonObject.get("item_skill_mastery_used");
if (mastery_used.length() > 1)
if (mastery_used.length() > 1) {
mastery_used = mastery_used.replaceAll("\\s", "");
mastery_used = mastery_used.replaceAll(",", "");
item_skill_mastery_used.add(Enum.CharacterSkills.valueOf(mastery_used));
}
}
}

Loading…
Cancel
Save