From 1755745c3486fbed6b92c2ebacddae2fc6086443 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 11 Sep 2014 16:36:57 +0300 Subject: eathena: add packet CMSG_PET_SET_NAME 0x01a5. --- src/net/eathena/pethandler.cpp | 6 ++++++ src/net/eathena/pethandler.h | 2 ++ src/net/eathena/protocol.h | 1 + 3 files changed, 9 insertions(+) (limited to 'src/net/eathena') 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 -- cgit v1.2.3-70-g09d2