diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-03 01:55:37 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-06 01:18:56 +0300 |
commit | afb32d7896cf03603d15802bc237fc53f7681444 (patch) | |
tree | 124c32967659be8ff6f79007a2109481100be207 /src/net/eathena/questhandler.cpp | |
parent | c92bd42d51d305d64519d16d3f83c5412c34fe2e (diff) | |
download | manaplus-afb32d7896cf03603d15802bc237fc53f7681444.tar.gz manaplus-afb32d7896cf03603d15802bc237fc53f7681444.tar.bz2 manaplus-afb32d7896cf03603d15802bc237fc53f7681444.tar.xz manaplus-afb32d7896cf03603d15802bc237fc53f7681444.zip |
eathena: impliment packet SMSG_QUEST_REMOVE 0x02b4.
Diffstat (limited to 'src/net/eathena/questhandler.cpp')
-rw-r--r-- | src/net/eathena/questhandler.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
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 |