diff options
-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 |