diff options
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/pethandler.cpp | 6 | ||||
-rw-r--r-- | src/net/eathena/pethandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/protocol.h | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/src/net/eathena/pethandler.cpp b/src/net/eathena/pethandler.cpp index 60ec03cd2..bf453055e 100644 --- a/src/net/eathena/pethandler.cpp +++ b/src/net/eathena/pethandler.cpp @@ -101,6 +101,12 @@ void PetHandler::requestPetState(const int data) const outMsg.writeInt32(data, "param"); } +void PetHandler::setName(const std::string &name) const +{ + MessageOut outMsg(CMSG_PET_SET_NAME); + outMsg.writeString(name, 24, "name"); +} + void PetHandler::processPetMessage(Net::MessageIn &msg) { msg.readInt32("pet id"); diff --git a/src/net/eathena/pethandler.h b/src/net/eathena/pethandler.h index f08ce43fa..4f8635dea 100644 --- a/src/net/eathena/pethandler.h +++ b/src/net/eathena/pethandler.h @@ -55,6 +55,8 @@ class PetHandler final : public MessageHandler, public Net::PetHandler void processPetMessage(Net::MessageIn &msg); + void setName(const std::string &name) const override final; + protected: int mRandCounter; }; diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index fc9e9a2f0..17b54bbf7 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -341,6 +341,7 @@ #define CMSG_PET_CATCH 0x019f #define CMSG_PET_REQUEST_STATE 0x01a9 +#define CMSG_PET_SET_NAME 0x01a5 #define SMSG_SOLVE_CHAR_NAME 0x0194 #define SMSG_SKILL_CASTING 0x07fb |