summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-11 16:36:57 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-11 16:36:57 +0300
commit1755745c3486fbed6b92c2ebacddae2fc6086443 (patch)
tree4cb9cbe1ce2a53d89272486740ce33a80a6e4d10 /src/net/eathena
parent23b35de445d6af7d6e00576f4fbdfa1d15ba37df (diff)
downloadmanaplus-1755745c3486fbed6b92c2ebacddae2fc6086443.tar.gz
manaplus-1755745c3486fbed6b92c2ebacddae2fc6086443.tar.bz2
manaplus-1755745c3486fbed6b92c2ebacddae2fc6086443.tar.xz
manaplus-1755745c3486fbed6b92c2ebacddae2fc6086443.zip
eathena: add packet CMSG_PET_SET_NAME 0x01a5.
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/pethandler.cpp6
-rw-r--r--src/net/eathena/pethandler.h2
-rw-r--r--src/net/eathena/protocol.h1
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