diff options
-rw-r--r-- | src/net/eathena/mercenaryhandler.cpp | 12 | ||||
-rw-r--r-- | src/net/eathena/mercenaryhandler.h | 4 | ||||
-rw-r--r-- | src/net/eathena/packets.h | 2 | ||||
-rw-r--r-- | src/net/eathena/protocol.h | 2 |
4 files changed, 19 insertions, 1 deletions
diff --git a/src/net/eathena/mercenaryhandler.cpp b/src/net/eathena/mercenaryhandler.cpp index a6ca9a1ab..4bab3a499 100644 --- a/src/net/eathena/mercenaryhandler.cpp +++ b/src/net/eathena/mercenaryhandler.cpp @@ -39,6 +39,7 @@ MercenaryHandler::MercenaryHandler() : { static const uint16_t _messages[] = { + SMSG_MERCENARY_UPDATE, 0 }; handledMessages = _messages; @@ -49,9 +50,20 @@ void MercenaryHandler::handleMessage(Net::MessageIn &msg) { switch (msg.getId()) { + case SMSG_MERCENARY_UPDATE: + processMercenaryUpdate(msg); + break; + default: break; } } +void MercenaryHandler::processMercenaryUpdate(Net::MessageIn &msg) +{ + // +++ need create if need mercenary being and update stat + msg.readInt16("type"); + msg.readInt32("value"); +} + } // namespace EAthena diff --git a/src/net/eathena/mercenaryhandler.h b/src/net/eathena/mercenaryhandler.h index bd91fa37b..742aeb9fb 100644 --- a/src/net/eathena/mercenaryhandler.h +++ b/src/net/eathena/mercenaryhandler.h @@ -38,6 +38,10 @@ class MercenaryHandler final : public MessageHandler, A_DELETE_COPY(MercenaryHandler) void handleMessage(Net::MessageIn &msg) override final; + + protected: + void processMercenaryUpdate(Net::MessageIn &msg); + }; } // namespace EAthena diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h index cbbc5ed8c..6d1c765e6 100644 --- a/src/net/eathena/packets.h +++ b/src/net/eathena/packets.h @@ -95,7 +95,7 @@ int16_t packet_lengths[] = // #0x0280 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 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, 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, // #0x02C0 0, -1, 0, 0, 0, 30, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index d88b5cb06..f3af515da 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -248,6 +248,8 @@ #define SMSG_NPC_CUTIN 0x01b3 #define SMSG_NPC_VIEWPOINT 0x0144 +#define SMSG_MERCENARY_UPDATE 0x02a2 + /********************************** * Packets from client to server * **********************************/ |