summaryrefslogtreecommitdiff
path: root/src/net/eathena/questhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-02 23:51:20 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-06 01:18:56 +0300
commitf4cbe447e2522cf61f77b68e1d862241ac0241a9 (patch)
treea95af1e14f66b84f3586b3236fa8cb712bf01ca1 /src/net/eathena/questhandler.cpp
parent49d592ea799d639bfeaf4f0dbaf36f86e0b64f20 (diff)
downloadmanaverse-f4cbe447e2522cf61f77b68e1d862241ac0241a9.tar.gz
manaverse-f4cbe447e2522cf61f77b68e1d862241ac0241a9.tar.bz2
manaverse-f4cbe447e2522cf61f77b68e1d862241ac0241a9.tar.xz
manaverse-f4cbe447e2522cf61f77b68e1d862241ac0241a9.zip
eathena: impliment packet SMSG_QUEST_LIST 0x02b1.
Diffstat (limited to 'src/net/eathena/questhandler.cpp')
-rw-r--r--src/net/eathena/questhandler.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/net/eathena/questhandler.cpp b/src/net/eathena/questhandler.cpp
index 7eb1734f1..7b857b9b7 100644
--- a/src/net/eathena/questhandler.cpp
+++ b/src/net/eathena/questhandler.cpp
@@ -38,6 +38,7 @@ QuestHandler::QuestHandler() :
static const uint16_t _messages[] =
{
SMSG_QUEST_ADD,
+ SMSG_QUEST_LIST,
0
};
handledMessages = _messages;
@@ -52,6 +53,10 @@ void QuestHandler::handleMessage(Net::MessageIn &msg)
processAddQuest(msg);
break;
+ case SMSG_QUEST_LIST:
+ processAddQuests(msg);
+ break;
+
default:
break;
}
@@ -84,4 +89,22 @@ void QuestHandler::processAddQuest(Net::MessageIn &msg)
}
}
+void QuestHandler::processAddQuests(Net::MessageIn &msg)
+{
+ msg.readInt16("len");
+ const int num = msg.readInt32("quests count");
+ for (int f = 0; f < num; f ++)
+ {
+ const int var = msg.readInt32("quest id");
+ const int val = msg.readUInt8("state");
+ if (questsWindow)
+ questsWindow->updateQuest(var, val);
+ if (skillDialog)
+ skillDialog->updateQuest(var, val);
+ }
+
+ if (questsWindow)
+ questsWindow->rebuild(false);
+}
+
} // namespace TmwAthena