diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-23 14:12:43 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-23 14:12:43 +0300 |
commit | 955f144a8310583babd96963a0c8e604ce8c849b (patch) | |
tree | d53aa5c32e8c811422214c9770d0bde2a910b46a /src/net | |
parent | 22ae95c948a4d1ec988a234213592500e52d4947 (diff) | |
download | mv-955f144a8310583babd96963a0c8e604ce8c849b.tar.gz mv-955f144a8310583babd96963a0c8e604ce8c849b.tar.bz2 mv-955f144a8310583babd96963a0c8e604ce8c849b.tar.xz mv-955f144a8310583babd96963a0c8e604ce8c849b.zip |
eathena: add partial support for packet SMSG_PET_FOOD 0x01a3.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/eathena/pethandler.cpp | 12 | ||||
-rw-r--r-- | src/net/eathena/pethandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/protocol.h | 1 |
3 files changed, 15 insertions, 0 deletions
diff --git a/src/net/eathena/pethandler.cpp b/src/net/eathena/pethandler.cpp index 1e51aa3b5..baf6d1056 100644 --- a/src/net/eathena/pethandler.cpp +++ b/src/net/eathena/pethandler.cpp @@ -66,6 +66,7 @@ PetHandler::PetHandler() : SMSG_PET_EGGS_LIST, SMSG_PET_DATA, SMSG_PET_STATUS, + SMSG_PET_FOOD, 0 }; handledMessages = _messages; @@ -97,6 +98,10 @@ void PetHandler::handleMessage(Net::MessageIn &msg) processPetStatus(msg); break; + case SMSG_PET_FOOD: + processPetFood(msg); + break; + default: break; } @@ -270,4 +275,11 @@ void PetHandler::processPetStatus(Net::MessageIn &msg) info->race = race; } +void PetHandler::processPetFood(Net::MessageIn &msg) +{ + // +++ need show notification message about success or fail + msg.readUInt8("result"); + msg.readInt16("food id"); +} + } // namespace EAthena diff --git a/src/net/eathena/pethandler.h b/src/net/eathena/pethandler.h index c80bbf486..bd6b94c64 100644 --- a/src/net/eathena/pethandler.h +++ b/src/net/eathena/pethandler.h @@ -66,6 +66,8 @@ class PetHandler final : public MessageHandler, public Net::PetHandler void processPetStatus(Net::MessageIn &msg); + void processPetFood(Net::MessageIn &msg); + int mRandCounter; }; diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index ce65cef86..ffb76bc99 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -227,6 +227,7 @@ #define SMSG_PET_EGGS_LIST 0x01a6 #define SMSG_PET_DATA 0x01a4 #define SMSG_PET_STATUS 0x01a2 +#define SMSG_PET_FOOD 0x01a3 #define SMSG_BANK_STATUS 0x09a6 |