forked from MagicBane/Server
Arraylists of ints
This commit is contained in:
@@ -129,6 +129,8 @@ public class ItemTemplate {
|
|||||||
public final HashMap<String, int[]> rune_skill_adj = new HashMap<>();
|
public final HashMap<String, int[]> rune_skill_adj = new HashMap<>();
|
||||||
public final EnumSet<Enum.MonsterType> rune_enemy_monster_types = EnumSet.noneOf(Enum.MonsterType.class);
|
public final EnumSet<Enum.MonsterType> rune_enemy_monster_types = EnumSet.noneOf(Enum.MonsterType.class);
|
||||||
public final EnumSet<Enum.MonsterType> rune_not_enemy_monster_types = EnumSet.noneOf(Enum.MonsterType.class);
|
public final EnumSet<Enum.MonsterType> rune_not_enemy_monster_types = EnumSet.noneOf(Enum.MonsterType.class);
|
||||||
|
public final ArrayList<Integer> rune_groupee_monster_types = new ArrayList<>();
|
||||||
|
public final ArrayList<Integer> rune_helper_monster_types = new ArrayList<>();
|
||||||
|
|
||||||
public ItemTemplate(JSONObject jsonObject) {
|
public ItemTemplate(JSONObject jsonObject) {
|
||||||
|
|
||||||
@@ -511,6 +513,20 @@ public class ItemTemplate {
|
|||||||
rune_not_enemy_monster_types.add(monsterType);
|
rune_not_enemy_monster_types.add(monsterType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
JSONArray groupee_types_json = (JSONArray) jsonObject.get("rune_groupee_monster_types");
|
||||||
|
|
||||||
|
for (Object o : groupee_types_json) {
|
||||||
|
int groupeeId = ((Long) o).intValue();
|
||||||
|
rune_groupee_monster_types.add(groupeeId);
|
||||||
|
}
|
||||||
|
|
||||||
|
JSONArray helper_types_json = (JSONArray) jsonObject.get("rune_helper_monster_types");
|
||||||
|
|
||||||
|
for (Object o : helper_types_json) {
|
||||||
|
int helperId = ((Long) o).intValue();
|
||||||
|
rune_helper_monster_types.add(helperId);
|
||||||
|
}
|
||||||
|
|
||||||
rune_renderable = ((Boolean) jsonObject.get("rune_renderable"));
|
rune_renderable = ((Boolean) jsonObject.get("rune_renderable"));
|
||||||
rune_natural_power_attack = ((Long) jsonObject.get("rune_natural_power_attack")).intValue();
|
rune_natural_power_attack = ((Long) jsonObject.get("rune_natural_power_attack")).intValue();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user