summaryrefslogtreecommitdiff
path: root/src/net/eathena/questhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-03 01:55:37 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-06 01:18:56 +0300
commitafb32d7896cf03603d15802bc237fc53f7681444 (patch)
tree124c32967659be8ff6f79007a2109481100be207 /src/net/eathena/questhandler.cpp
parentc92bd42d51d305d64519d16d3f83c5412c34fe2e (diff)
downloadplus-afb32d7896cf03603d15802bc237fc53f7681444.tar.gz
plus-afb32d7896cf03603d15802bc237fc53f7681444.tar.bz2
plus-afb32d7896cf03603d15802bc237fc53f7681444.tar.xz
plus-afb32d7896cf03603d15802bc237fc53f7681444.zip
eathena: impliment packet SMSG_QUEST_REMOVE 0x02b4.
Diffstat (limited to 'src/net/eathena/questhandler.cpp')
-rw-r--r--src/net/eathena/questhandler.cpp24
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