diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-22 21:31:35 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-22 21:31:35 +0300 |
commit | 4545b34b1533657d58788285a38b5128f49070a8 (patch) | |
tree | 23c99720d0d0d3849e07903dc12e4b188d860ecf /src/net | |
parent | 69bf9bf688016066c1561ca55b0bfd8fd5e2c6bb (diff) | |
download | plus-4545b34b1533657d58788285a38b5128f49070a8.tar.gz plus-4545b34b1533657d58788285a38b5128f49070a8.tar.bz2 plus-4545b34b1533657d58788285a38b5128f49070a8.tar.xz plus-4545b34b1533657d58788285a38b5128f49070a8.zip |
eathena: add partial support for packet SMSG_PET_STATUS 0x01a2.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/eathena/packets.h | 2 | ||||
-rw-r--r-- | src/net/eathena/pethandler.cpp | 16 | ||||
-rw-r--r-- | src/net/eathena/pethandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/protocol.h | 1 |
4 files changed, 20 insertions, 1 deletions
diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h index 73d6c4dcb..3f2da4d33 100644 --- a/src/net/eathena/packets.h +++ b/src/net/eathena/packets.h @@ -73,7 +73,7 @@ int16_t packet_lengths[] = // #0x0180 6, 3, 106, 10, 10, 34, 0, 6, 8, 4, 4, 4, 29, -1, 10, 6, 90, 86, 24, 6, 30, 102, 9, 4, 8, 4, 14, 10, 4, 6, 2, 6, - 3, 3, 35, 5, 11, 26, -1, 4, 4, 6, 10, 12, 6, -1, 4, 4, + 3, 3, 37, 5, 11, 26, -1, 4, 4, 6, 10, 12, 6, -1, 4, 4, 11, 7, -1, 67, 12, 18, 114, 6, 3, 6, 26, 26, 26, 26, 2, 3, // #0x01C0 2, 14, 10, -1, 22, 22, 4, 2, 13, 97, 0, 9, 9, 29, 6, 28, diff --git a/src/net/eathena/pethandler.cpp b/src/net/eathena/pethandler.cpp index a2b410b70..899e836bf 100644 --- a/src/net/eathena/pethandler.cpp +++ b/src/net/eathena/pethandler.cpp @@ -57,6 +57,7 @@ PetHandler::PetHandler() : SMSG_PET_ROULETTE, SMSG_PET_EGGS_LIST, SMSG_PET_DATA, + SMSG_PET_STATUS, 0 }; handledMessages = _messages; @@ -84,6 +85,10 @@ void PetHandler::handleMessage(Net::MessageIn &msg) processPetData(msg); break; + case SMSG_PET_STATUS: + processPetStatus(msg); + break; + default: break; } @@ -183,4 +188,15 @@ void PetHandler::processPetData(Net::MessageIn &msg) msg.readInt32("param"); } +void PetHandler::processPetStatus(Net::MessageIn &msg) +{ + msg.readString(24, "pet name"); + msg.readUInt8("rename flag"); + msg.readInt16("level"); + msg.readInt16("hungry"); + msg.readInt16("intimate"); + msg.readInt16("equip"); + msg.readInt16("class"); +} + } // namespace EAthena diff --git a/src/net/eathena/pethandler.h b/src/net/eathena/pethandler.h index a0c561622..c80bbf486 100644 --- a/src/net/eathena/pethandler.h +++ b/src/net/eathena/pethandler.h @@ -64,6 +64,8 @@ class PetHandler final : public MessageHandler, public Net::PetHandler void processPetData(Net::MessageIn &msg); + void processPetStatus(Net::MessageIn &msg); + int mRandCounter; }; diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index 6f3ed2dfa..ce65cef86 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -226,6 +226,7 @@ #define SMSG_PET_ROULETTE 0x01a0 #define SMSG_PET_EGGS_LIST 0x01a6 #define SMSG_PET_DATA 0x01a4 +#define SMSG_PET_STATUS 0x01a2 #define SMSG_BANK_STATUS 0x09a6 |