From dc5e757b8ef36c1d3b083a67f4a55aead37b706c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 14 Oct 2014 13:13:20 +0300 Subject: eathena: add partial support for packet SMSG_QUEST_ACTIVATE 0x02b7. --- src/net/eathena/packets.h | 2 +- src/net/eathena/protocol.h | 1 + src/net/eathena/questhandler.cpp | 12 ++++++++++++ src/net/eathena/questhandler.h | 2 ++ 4 files changed, 16 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h index 849916a43..a818b5313 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, 14, 0, 0, 0, 0, 0, 18, 0, 0, 0, 4, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 0, -1, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, -1, -1, 107, 6, -1, 0, 0, 0, 191, 0, 0, 0, 0, 0, 0, + 0, -1, -1, 107, 6, -1, 0, 7, 0, 191, 0, 0, 0, 0, 0, 0, // #0x02C0 0, -1, 0, 0, 0, 30, 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 a6c0d7546..e6c0e18bc 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -226,6 +226,7 @@ #define SMSG_QUEST_LIST_OBJECTIVES 0x02b2 #define SMSG_QUEST_UPDATE_OBJECTIVES 0x02b5 #define SMSG_QUEST_REMOVE 0x02b4 +#define SMSG_QUEST_ACTIVATE 0x02b7 #define SMSG_MVP 0x010c #define SMSG_RANKS_LIST 0x097d diff --git a/src/net/eathena/questhandler.cpp b/src/net/eathena/questhandler.cpp index dcdf726f2..5c27cbe00 100644 --- a/src/net/eathena/questhandler.cpp +++ b/src/net/eathena/questhandler.cpp @@ -44,6 +44,7 @@ QuestHandler::QuestHandler() : SMSG_QUEST_LIST_OBJECTIVES, SMSG_QUEST_UPDATE_OBJECTIVES, SMSG_QUEST_REMOVE, + SMSG_QUEST_ACTIVATE, 0 }; handledMessages = _messages; @@ -75,6 +76,10 @@ void QuestHandler::handleMessage(Net::MessageIn &msg) processRemoveQuest(msg); break; + case SMSG_QUEST_ACTIVATE: + processActivateQuest(msg); + break; + default: break; } @@ -182,6 +187,13 @@ void QuestHandler::processRemoveQuest(Net::MessageIn &msg) } } +void QuestHandler::processActivateQuest(Net::MessageIn &msg) +{ + // +++ need enable/disable quests depend on this packet + msg.readInt32("quest id"); + msg.readUInt8("activate"); +} + void QuestHandler::setQeustActiveState(const int questId, const bool active) const { diff --git a/src/net/eathena/questhandler.h b/src/net/eathena/questhandler.h index d1eca4e4b..a588e18ce 100644 --- a/src/net/eathena/questhandler.h +++ b/src/net/eathena/questhandler.h @@ -50,6 +50,8 @@ class QuestHandler final : public MessageHandler, public Net::QuestHandler static void processUpdateQuestsObjectives(Net::MessageIn &msg); static void processRemoveQuest(Net::MessageIn &msg); + + static void processActivateQuest(Net::MessageIn &msg); }; } // namespace EAthena -- cgit v1.2.3-70-g09d2