|
|
@ -50,6 +50,7 @@ public class ItemTemplate { |
|
|
|
public EnumSet<Enum.ItemFlags> item_flags = EnumSet.noneOf(Enum.ItemFlags.class); |
|
|
|
public EnumSet<Enum.ItemFlags> item_flags = EnumSet.noneOf(Enum.ItemFlags.class); |
|
|
|
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 ItemTemplate(JSONObject jsonObject) { |
|
|
|
public ItemTemplate(JSONObject jsonObject) { |
|
|
|
|
|
|
|
|
|
|
@ -146,6 +147,17 @@ public class ItemTemplate { |
|
|
|
|
|
|
|
|
|
|
|
item_initial_charges = ((Long) jsonObject.get("item_initial_charges")).intValue(); |
|
|
|
item_initial_charges = ((Long) jsonObject.get("item_initial_charges")).intValue(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JSONObject skill_required = (JSONObject) jsonObject.get("item_skill_req"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (skill_required.isEmpty() == false) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String skill_type = (String) skill_required.get("skill_type"); |
|
|
|
|
|
|
|
skill_type = skill_type.replaceAll("\\s", ""); |
|
|
|
|
|
|
|
skill_type = skill_type.replaceAll(",", ""); |
|
|
|
|
|
|
|
int skill_level = ((Long) skill_required.get("skill_level")).intValue(); |
|
|
|
|
|
|
|
item_skill_required.put(Enum.CharacterSkills.valueOf(skill_type), skill_level); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|