From afb32d7896cf03603d15802bc237fc53f7681444 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 3 Sep 2014 01:55:37 +0300 Subject: eathena: impliment packet SMSG_QUEST_REMOVE 0x02b4. --- src/net/eathena/questhandler.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/net/eathena/questhandler.cpp') diff --git a/src/net/eathena/questhandler.cpp b/src/net/eathena/questhandler.cpp index 3dee91b3f..3d6cde34f 100644 --- a/src/net/eathena/questhandler.cpp +++ b/src/net/eathena/questhandler.cpp @@ -41,6 +41,7 @@ QuestHandler::QuestHandler() : SMSG_QUEST_LIST, SMSG_QUEST_LIST_OBJECTIVES, SMSG_QUEST_UPDATE_OBJECTIVES, + SMSG_QUEST_REMOVE, 0 }; handledMessages = _messages; @@ -67,6 +68,10 @@ void QuestHandler::handleMessage(Net::MessageIn &msg) processUpdateQuestsObjectives(msg); break; + case SMSG_QUEST_REMOVE: + processRemoveQuest(msg); + break; + default: break; } @@ -152,4 +157,23 @@ void QuestHandler::processUpdateQuestsObjectives(Net::MessageIn &msg) } } +void QuestHandler::processRemoveQuest(Net::MessageIn &msg) +{ + const int var = msg.readInt32("quest id"); + const int val = -1; + + // not removing quest, because this is impossible, + // but changing status to -1 + if (questsWindow) + { + questsWindow->updateQuest(var, val); + questsWindow->rebuild(true); + } + if (skillDialog) + { + skillDialog->updateQuest(var, val); + skillDialog->playUpdateEffect(var + SKILL_VAR_MIN_ID); + } +} + } // namespace TmwAthena -- cgit v1.2.3-70-g09d2