diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-11 16:36:57 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-11 16:36:57 +0300 |
commit | 1755745c3486fbed6b92c2ebacddae2fc6086443 (patch) | |
tree | 4cb9cbe1ce2a53d89272486740ce33a80a6e4d10 /src | |
parent | 23b35de445d6af7d6e00576f4fbdfa1d15ba37df (diff) | |
download | manaverse-1755745c3486fbed6b92c2ebacddae2fc6086443.tar.gz manaverse-1755745c3486fbed6b92c2ebacddae2fc6086443.tar.bz2 manaverse-1755745c3486fbed6b92c2ebacddae2fc6086443.tar.xz manaverse-1755745c3486fbed6b92c2ebacddae2fc6086443.zip |
eathena: add packet CMSG_PET_SET_NAME 0x01a5.
Diffstat (limited to 'src')
-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 | ||||
-rw-r--r-- | src/net/pethandler.h | 2 | ||||
-rw-r--r-- | src/net/tmwa/pethandler.cpp | 6 | ||||
-rw-r--r-- | src/net/tmwa/pethandler.h | 2 |
6 files changed, 18 insertions, 1 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 diff --git a/src/net/pethandler.h b/src/net/pethandler.h index 745d70195..3a90b98f1 100644 --- a/src/net/pethandler.h +++ b/src/net/pethandler.h @@ -46,6 +46,8 @@ class PetHandler notfinal virtual void catchPet(const Being *const being) const = 0; virtual void requestPetState(const int data) const = 0; + + virtual void setName(const std::string &name) const = 0; }; } // namespace Net diff --git a/src/net/tmwa/pethandler.cpp b/src/net/tmwa/pethandler.cpp index a9c854de0..0ca5f7c63 100644 --- a/src/net/tmwa/pethandler.cpp +++ b/src/net/tmwa/pethandler.cpp @@ -78,7 +78,11 @@ void PetHandler::catchPet(const Being *const being A_UNUSED) const { } -void PetHandler::requestPetState(const int data) const +void PetHandler::requestPetState(const int data A_UNUSED) const +{ +} + +void PetHandler::setName(const std::string &name A_UNUSED) const { } diff --git a/src/net/tmwa/pethandler.h b/src/net/tmwa/pethandler.h index 2aeb4dd13..113fba6b6 100644 --- a/src/net/tmwa/pethandler.h +++ b/src/net/tmwa/pethandler.h @@ -53,6 +53,8 @@ class PetHandler final : public MessageHandler, public Net::PetHandler void requestPetState(const int data) const override final; + void setName(const std::string &name) const override final; + protected: int mRandCounter; }; |