From 0416def34b70d89754006fa96a49c1180b5bbacf Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 25 Sep 2014 13:30:49 +0300 Subject: eathena: add packet CMSG_HOMUNCULUS_SET_NAME 0x0231. --- src/net/eathena/homunculushandler.cpp | 6 ++++++ src/net/eathena/homunculushandler.h | 2 ++ src/net/eathena/protocol.h | 2 ++ src/net/homunculushandler.h | 2 ++ src/net/tmwa/homunculushandler.cpp | 4 ++++ src/net/tmwa/homunculushandler.h | 2 ++ 6 files changed, 18 insertions(+) (limited to 'src') diff --git a/src/net/eathena/homunculushandler.cpp b/src/net/eathena/homunculushandler.cpp index 8030bf4bb..567bad3e4 100644 --- a/src/net/eathena/homunculushandler.cpp +++ b/src/net/eathena/homunculushandler.cpp @@ -179,4 +179,10 @@ void HomunculusHandler::processHomunculusInfo(Net::MessageIn &msg) PlayerInfo::setHomunculusBeing(dstBeing); } +void HomunculusHandler::setName(const std::string &name) const +{ + createOutPacket(CMSG_HOMUNCULUS_SET_NAME); + outMsg.writeString(name, 24, "name"); +} + } // namespace EAthena diff --git a/src/net/eathena/homunculushandler.h b/src/net/eathena/homunculushandler.h index 6fa49a451..77cffb3d5 100644 --- a/src/net/eathena/homunculushandler.h +++ b/src/net/eathena/homunculushandler.h @@ -39,6 +39,8 @@ class HomunculusHandler final : public MessageHandler, void handleMessage(Net::MessageIn &msg) override final; + void setName(const std::string &name) const override final; + protected: void processHomunculusSkills(Net::MessageIn &msg); diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index 5e059a3b9..ad53b9269 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -417,6 +417,8 @@ #define CMSG_PET_SELECT_EGG 0x01a7 #define CMSG_PET_MENU_ACTION 0x01a1 +#define CMSG_HOMUNCULUS_SET_NAME 0x0231 + #define CMSG_DORI_DORI 0x01e7 #define CMSG_EXPLOSION_SPIRITS 0x01ed #define CMSG_PVP_INFO 0x020f diff --git a/src/net/homunculushandler.h b/src/net/homunculushandler.h index cc1d15b1e..ded676341 100644 --- a/src/net/homunculushandler.h +++ b/src/net/homunculushandler.h @@ -33,6 +33,8 @@ class HomunculusHandler notfinal public: virtual ~HomunculusHandler() { } + + virtual void setName(const std::string &name) const = 0; }; } // namespace Net diff --git a/src/net/tmwa/homunculushandler.cpp b/src/net/tmwa/homunculushandler.cpp index e9cecc71c..d79e5289c 100644 --- a/src/net/tmwa/homunculushandler.cpp +++ b/src/net/tmwa/homunculushandler.cpp @@ -42,4 +42,8 @@ void HomunculusHandler::handleMessage(Net::MessageIn &msg A_UNUSED) { } +void HomunculusHandler::setName(const std::string &name A_UNUSED) const +{ +} + } // namespace TmwAthena diff --git a/src/net/tmwa/homunculushandler.h b/src/net/tmwa/homunculushandler.h index 444d4aff9..c67b52f89 100644 --- a/src/net/tmwa/homunculushandler.h +++ b/src/net/tmwa/homunculushandler.h @@ -37,6 +37,8 @@ class HomunculusHandler final : public MessageHandler, A_DELETE_COPY(HomunculusHandler) void handleMessage(Net::MessageIn &msg) override final; + + void setName(const std::string &name) const override final; }; } // namespace TmwAthena -- cgit v1.2.3-70-g09d2