@Override public boolean onLvlUpEvent(QuestEnv env) { Player player = env.getPlayer(); QuestState qs = player.getQuestStateList().getQuestState(questId); boolean lvlCheck = QuestService.checkLevelRequirement(questId, player.getCommonData().getLevel()); if (qs == null || !lvlCheck || qs.getStatus() != QuestStatus.LOCKED) return false; qs.setStatus(QuestStatus.START); updateQuestStatus(player, qs); return true; }
@Override public boolean onLvlUpEvent(QuestEnv env) { final Player player = env.getPlayer(); final QuestState qs = player.getQuestStateList().getQuestState(questId); boolean lvlCheck = QuestService.checkLevelRequirement(questId, player.getCommonData().getLevel()); if (qs != null || !lvlCheck) return false; env.setQuestId(questId); QuestService.startQuest(env, QuestStatus.START); return true; }