Свернуть ↑
/*
* This file is part of Aion-Lightning <http://www.zetta-core.org>.
*
* Aion-Lightning is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published
* by the Free Software Foundation, either version 3 of the License,
* or (at your option) any later version.
*
* Aion-Lightning is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Aion-Lightning. If not, see <http://www.gnu.org/licenses/>.
*/
package quest.reshanta;
import com.aionemu.gameserver.model.gameobjects.player.Pl ayer;
import com.aionemu.gameserver.questEngine.handlers.QuestH andler;
import com.aionemu.gameserver.questEngine.model.QuestDial og;
import com.aionemu.gameserver.questEngine.model.QuestEnv;
import com.aionemu.gameserver.questEngine.model.QuestStat e;
import com.aionemu.gameserver.questEngine.model.QuestStat us;
import com.aionemu.gameserver.utils.stats.AbyssRankEnum;
/**
* @author Hilgert
* @modified vlog
*/
public class _2702Defeat9thRankElyosSoldiers extends QuestHandler {
private final static int questId = 2702;
public _2702Defeat9thRankElyosSoldiers() {
super(questId);
}
@Override
public void register() {
qe.registerQuestNpc(278016).addOnQuestStart(questI d);
qe.registerQuestNpc(278016).addOnTalkEvent(questId );
qe.registerOnKillRanked(AbyssRankEnum.GRADE9_SOLDI ER, questId);
}
@Override
public boolean onKillRankedEvent(QuestEnv env) {
return defaultOnKillRankedEvent(env, 0, 20, true); // reward
}
@Override
public boolean onDialogEvent(QuestEnv env) {
Player player = env.getPlayer();
QuestState qs = player.getQuestStateList().getQuestState(questId);
if (env.getTargetId() == 278016) {
if (qs == null || qs.getStatus() == QuestStatus.NONE || qs.canRepeat()) {
if (env.getDialog() == QuestDialog.START_DIALOG)
return sendQuestDialog(env, 1011);
else
return sendQuestStartDialog(env);
}
else if (qs != null && qs.getStatus() == QuestStatus.REWARD) {
if (env.getTargetId() == 278016) {
if (env.getDialog() == QuestDialog.USE_OBJECT)
return sendQuestDialog(env, 1352);
else
return sendQuestEndDialog(env);
}
}
}
return false;
}
}