diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-03 00:06:32 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-06 01:18:56 +0300 |
commit | 6389a4cdcf2b67385bcdb5a37954caba6c28464a (patch) | |
tree | 4bd3b19342823abf5f3599179b7189068acf872a /src/net/eathena/questhandler.cpp | |
parent | f4cbe447e2522cf61f77b68e1d862241ac0241a9 (diff) | |
download | manaverse-6389a4cdcf2b67385bcdb5a37954caba6c28464a.tar.gz manaverse-6389a4cdcf2b67385bcdb5a37954caba6c28464a.tar.bz2 manaverse-6389a4cdcf2b67385bcdb5a37954caba6c28464a.tar.xz manaverse-6389a4cdcf2b67385bcdb5a37954caba6c28464a.zip |
eathena: partially impliment packet SMSG_QUEST_LIST_OBJECTIVES 0x02b2.
Diffstat (limited to 'src/net/eathena/questhandler.cpp')
-rw-r--r-- | src/net/eathena/questhandler.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/net/eathena/questhandler.cpp b/src/net/eathena/questhandler.cpp index 7b857b9b7..496ea49ad 100644 --- a/src/net/eathena/questhandler.cpp +++ b/src/net/eathena/questhandler.cpp @@ -39,6 +39,7 @@ QuestHandler::QuestHandler() : { SMSG_QUEST_ADD, SMSG_QUEST_LIST, + SMSG_QUEST_LIST_OBJECTIVES, 0 }; handledMessages = _messages; @@ -57,6 +58,10 @@ void QuestHandler::handleMessage(Net::MessageIn &msg) processAddQuests(msg); break; + case SMSG_QUEST_LIST_OBJECTIVES: + processAddQuestsObjectives(msg); + break; + default: break; } @@ -107,4 +112,24 @@ void QuestHandler::processAddQuests(Net::MessageIn &msg) questsWindow->rebuild(false); } +void QuestHandler::processAddQuestsObjectives(Net::MessageIn &msg) +{ + msg.readInt16("len"); + const int quests = msg.readInt32("quests count"); + for (int f = 0; f < quests; f ++) + { + const int var = msg.readInt32("quest id"); + msg.readInt32("time diff"); + msg.readInt32("time"); + const int num = msg.readInt16("objectives count"); + for (int d = 0; d < num; d ++) + { + // need use in quests kills list + msg.readInt32("monster id"); + msg.readInt16("count"); + msg.readString(24, "monster name"); + } + } +} + } // namespace TmwAthena |