diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-19 19:33:31 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-19 19:33:31 +0300 |
commit | 6ea528b2eff23e9a7c833692afc080c786ed2419 (patch) | |
tree | c90f7aecb1cbeea300c3d3414286ddc12379e1f4 /src | |
parent | 82d9ed1a055c7cdb7856c695104e9838f4e1718f (diff) | |
download | manaverse-6ea528b2eff23e9a7c833692afc080c786ed2419.tar.gz manaverse-6ea528b2eff23e9a7c833692afc080c786ed2419.tar.bz2 manaverse-6ea528b2eff23e9a7c833692afc080c786ed2419.tar.xz manaverse-6ea528b2eff23e9a7c833692afc080c786ed2419.zip |
eathena: add partial support for packet SMSG_MERCENARY_UPDATE 0x02a2.
Diffstat (limited to 'src')
-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 * **********************************/ |