Browse Source

Parsing races

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

8
src/engine/objects/ItemTemplate.java

@ -51,8 +51,8 @@ public class ItemTemplate {
public EnumSet<Enum.ItemUseFlags> item_use_flags = EnumSet.noneOf(Enum.ItemUseFlags.class); public EnumSet<Enum.ItemUseFlags> item_use_flags = EnumSet.noneOf(Enum.ItemUseFlags.class);
public int item_initial_charges; public int item_initial_charges;
public HashMap<Enum.CharacterSkills, Integer> item_skill_required = new HashMap<>(); public HashMap<Enum.CharacterSkills, Integer> item_skill_required = new HashMap<>();
public EnumSet<Enum.RaceType> item_race_req = EnumSet.noneOf(Enum.RaceType.class); public EnumSet<Enum.MonsterType> item_race_req = EnumSet.noneOf(Enum.MonsterType.class);
public EnumSet<Enum.RaceType> item_race_res = EnumSet.noneOf(Enum.RaceType.class); public EnumSet<Enum.MonsterType> item_race_res = EnumSet.noneOf(Enum.MonsterType.class);
public ItemTemplate(JSONObject jsonObject) { public ItemTemplate(JSONObject jsonObject) {
@ -181,9 +181,9 @@ public class ItemTemplate {
race = race.replaceAll(",", ""); race = race.replaceAll(",", "");
if (restrict) if (restrict)
item_race_res.add(Enum.RaceType.valueOf(race)); item_race_res.add(Enum.MonsterType.valueOf(race));
else else
item_race_req.add(Enum.RaceType.valueOf(race)); item_race_req.add(Enum.MonsterType.valueOf(race));
} }
} catch (Exception e) { } catch (Exception e) {

Loading…
Cancel
Save