Fix mob using attack with no diseaseSkill causing errors

This commit is contained in:
P0nk
2022-09-12 20:31:38 +02:00
parent 0c6548a36d
commit d31f4806fc
14 changed files with 71 additions and 45 deletions

View File

@@ -111,7 +111,7 @@ public class MonsterStatFetcher {
Set<MobSkillId> skills = new HashSet<>();
while (monsterSkillData.getChildByPath(Integer.toString(i)) != null) {
int skillId = DataTool.getInt(i + "/skill", monsterSkillData, 0);
MobSkillType type = MobSkillType.from(skillId);
MobSkillType type = MobSkillType.from(skillId).orElseThrow();
int skillLevel = DataTool.getInt(i + "/level", monsterSkillData, 0);
skills.add(new MobSkillId(type, skillLevel));
i++;