diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-11 16:00:32 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-11 16:00:32 +0300 |
commit | 23b35de445d6af7d6e00576f4fbdfa1d15ba37df (patch) | |
tree | ca945d6ca28f63f59db68391dcacf6cfc5fc06d7 /src | |
parent | 4c4c2684278f84f952544d8e4f119ce9da980c1a (diff) | |
download | mv-23b35de445d6af7d6e00576f4fbdfa1d15ba37df.tar.gz mv-23b35de445d6af7d6e00576f4fbdfa1d15ba37df.tar.bz2 mv-23b35de445d6af7d6e00576f4fbdfa1d15ba37df.tar.xz mv-23b35de445d6af7d6e00576f4fbdfa1d15ba37df.zip |
eathena: add partial support for packet SMSG_PET_MESSAGE 0x01aa.
Diffstat (limited to 'src')
-rw-r--r-- | src/net/eathena/pethandler.cpp | 18 | ||||
-rw-r--r-- | src/net/eathena/pethandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/protocol.h | 2 |
3 files changed, 21 insertions, 1 deletions
diff --git a/src/net/eathena/pethandler.cpp b/src/net/eathena/pethandler.cpp index 9d6772006..60ec03cd2 100644 --- a/src/net/eathena/pethandler.cpp +++ b/src/net/eathena/pethandler.cpp @@ -41,15 +41,25 @@ PetHandler::PetHandler() : { static const uint16_t _messages[] = { + SMSG_PET_MESSAGE, 0 }; handledMessages = _messages; petHandler = this; } -void PetHandler::handleMessage(Net::MessageIn &msg A_UNUSED) +void PetHandler::handleMessage(Net::MessageIn &msg) { BLOCK_START("PetHandler::handleMessage") + switch (msg.getId()) + { + case SMSG_PET_MESSAGE: + processPetMessage(msg); + break; + + default: + break; + } BLOCK_END("PetHandler::handleMessage") } @@ -91,4 +101,10 @@ void PetHandler::requestPetState(const int data) const outMsg.writeInt32(data, "param"); } +void PetHandler::processPetMessage(Net::MessageIn &msg) +{ + msg.readInt32("pet id"); + msg.readInt32("param"); +} + } // namespace EAthena diff --git a/src/net/eathena/pethandler.h b/src/net/eathena/pethandler.h index af3e1d918..f08ce43fa 100644 --- a/src/net/eathena/pethandler.h +++ b/src/net/eathena/pethandler.h @@ -53,6 +53,8 @@ class PetHandler final : public MessageHandler, public Net::PetHandler void requestPetState(const int data) const override final; + void processPetMessage(Net::MessageIn &msg); + protected: int mRandCounter; }; diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index 3e806f76d..fc9e9a2f0 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -204,6 +204,8 @@ #define SMSG_MAIL_OPEN_WINDOW 0x0260 +#define SMSG_PET_MESSAGE 0x01aa + /********************************** * Packets from client to server * **********************************/ |