diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-22 00:05:42 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-22 00:05:42 +0300 |
commit | dc523c0a90af99bdb78216f550576e7d38cb6737 (patch) | |
tree | 741564a9fdd83e966f5b86a695d56882196658d9 /src | |
parent | 68f7d0afad5023ccd0e5eb8e6739cf2baf217f7c (diff) | |
download | manaverse-dc523c0a90af99bdb78216f550576e7d38cb6737.tar.gz manaverse-dc523c0a90af99bdb78216f550576e7d38cb6737.tar.bz2 manaverse-dc523c0a90af99bdb78216f550576e7d38cb6737.tar.xz manaverse-dc523c0a90af99bdb78216f550576e7d38cb6737.zip |
eathena: add partial support for packet SMSG_PET_EGGS_LIST 0x01a6.
Diffstat (limited to 'src')
-rw-r--r-- | src/net/eathena/pethandler.cpp | 14 | ||||
-rw-r--r-- | src/net/eathena/pethandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/protocol.h | 1 |
3 files changed, 17 insertions, 0 deletions
diff --git a/src/net/eathena/pethandler.cpp b/src/net/eathena/pethandler.cpp index 7ccc57283..9fb6ecdfd 100644 --- a/src/net/eathena/pethandler.cpp +++ b/src/net/eathena/pethandler.cpp @@ -47,6 +47,7 @@ PetHandler::PetHandler() : { SMSG_PET_MESSAGE, SMSG_PET_ROULETTE, + SMSG_PET_EGGS_LIST, 0 }; handledMessages = _messages; @@ -66,6 +67,10 @@ void PetHandler::handleMessage(Net::MessageIn &msg) processPetRoulette(msg); break; + case SMSG_PET_EGGS_LIST: + processEggsList(msg); + break; + default: break; } @@ -139,4 +144,13 @@ void PetHandler::processPetRoulette(Net::MessageIn &msg) } } +void PetHandler::processEggsList(Net::MessageIn &msg) +{ + const int count = (msg.readInt16("len") - 4) / 2; + for (int f = 0; f < count; f ++) + { + msg.readInt16("egg index"); + } +} + } // namespace EAthena diff --git a/src/net/eathena/pethandler.h b/src/net/eathena/pethandler.h index 615139bad..3dbdd7b66 100644 --- a/src/net/eathena/pethandler.h +++ b/src/net/eathena/pethandler.h @@ -60,6 +60,8 @@ class PetHandler final : public MessageHandler, public Net::PetHandler protected: void processPetRoulette(Net::MessageIn &msg); + void processEggsList(Net::MessageIn &msg); + int mRandCounter; }; diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index 2dc51d5f6..52ddaf48f 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -224,6 +224,7 @@ #define SMSG_PET_MESSAGE 0x01aa #define SMSG_PET_ROULETTE 0x01a0 +#define SMSG_PET_EGGS_LIST 0x01a6 #define SMSG_BANK_STATUS 0x09a6 |