diff options
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/packets.h | 2 | ||||
-rw-r--r-- | src/net/eathena/protocol.h | 1 | ||||
-rw-r--r-- | src/net/eathena/questhandler.cpp | 25 | ||||
-rw-r--r-- | src/net/eathena/questhandler.h | 2 |
4 files changed, 29 insertions, 1 deletions
diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h index 0d9371b94..463b52537 100644 --- a/src/net/eathena/packets.h +++ b/src/net/eathena/packets.h @@ -96,7 +96,7 @@ int16_t packet_lengths[] = 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, -1, 0, 107, 0, 0, 0, 0, 0, 191, 0, 0, 0, 0, 0, 0, + 0, -1, -1, 107, 0, 0, 0, 0, 0, 191, 0, 0, 0, 0, 0, 0, // #0x02C0 0, -1, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index 960bfcedd..7aee6cfa3 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -184,6 +184,7 @@ #define SMSG_QUEST_ADD 0x02b3 #define SMSG_QUEST_LIST 0x02b1 +#define SMSG_QUEST_LIST_OBJECTIVES 0x02b2 #define SMSG_MVP 0x010c 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 diff --git a/src/net/eathena/questhandler.h b/src/net/eathena/questhandler.h index 2177db62c..95cab96d3 100644 --- a/src/net/eathena/questhandler.h +++ b/src/net/eathena/questhandler.h @@ -39,6 +39,8 @@ class QuestHandler final : public MessageHandler static void processAddQuest(Net::MessageIn &msg); static void processAddQuests(Net::MessageIn &msg); + + static void processAddQuestsObjectives(Net::MessageIn &msg); }; } // namespace EAthena |