diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-25 13:45:37 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-25 13:45:37 +0300 |
commit | 0ef4d8b885bf98735dbf800fc7385f625f18a9e4 (patch) | |
tree | 69c6370ab94d675251aa99f4b2396c293c9c1498 /src/net/eathena | |
parent | 0416def34b70d89754006fa96a49c1180b5bbacf (diff) | |
download | ManaVerse-0ef4d8b885bf98735dbf800fc7385f625f18a9e4.tar.gz ManaVerse-0ef4d8b885bf98735dbf800fc7385f625f18a9e4.tar.bz2 ManaVerse-0ef4d8b885bf98735dbf800fc7385f625f18a9e4.tar.xz ManaVerse-0ef4d8b885bf98735dbf800fc7385f625f18a9e4.zip |
eathena: add packet CMSG_HOMMERC_MOVE_TO_MASTER 0x0234.
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/homunculushandler.cpp | 9 | ||||
-rw-r--r-- | src/net/eathena/homunculushandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/mercenaryhandler.cpp | 9 | ||||
-rw-r--r-- | src/net/eathena/mercenaryhandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/protocol.h | 1 |
5 files changed, 23 insertions, 0 deletions
diff --git a/src/net/eathena/homunculushandler.cpp b/src/net/eathena/homunculushandler.cpp index 567bad3e4..54c64cf59 100644 --- a/src/net/eathena/homunculushandler.cpp +++ b/src/net/eathena/homunculushandler.cpp @@ -185,4 +185,13 @@ void HomunculusHandler::setName(const std::string &name) const outMsg.writeString(name, 24, "name"); } +void HomunculusHandler::moveToMaster() const +{ + const int id = PlayerInfo::getHomunculusId(); + if (!id) + return; + createOutPacket(CMSG_HOMMERC_MOVE_TO_MASTER); + outMsg.writeInt32(id); +} + } // namespace EAthena diff --git a/src/net/eathena/homunculushandler.h b/src/net/eathena/homunculushandler.h index 77cffb3d5..627561655 100644 --- a/src/net/eathena/homunculushandler.h +++ b/src/net/eathena/homunculushandler.h @@ -41,6 +41,8 @@ class HomunculusHandler final : public MessageHandler, void setName(const std::string &name) const override final; + void moveToMaster() const override final; + protected: void processHomunculusSkills(Net::MessageIn &msg); diff --git a/src/net/eathena/mercenaryhandler.cpp b/src/net/eathena/mercenaryhandler.cpp index 541f62cf7..dae3f1836 100644 --- a/src/net/eathena/mercenaryhandler.cpp +++ b/src/net/eathena/mercenaryhandler.cpp @@ -186,4 +186,13 @@ void MercenaryHandler::fire() outMsg.writeInt8(2, "action"); // delete } +void MercenaryHandler::moveToMaster() const +{ + const int id = PlayerInfo::getMercenaryId(); + if (!id) + return; + createOutPacket(CMSG_HOMMERC_MOVE_TO_MASTER); + outMsg.writeInt32(id); +} + } // namespace EAthena diff --git a/src/net/eathena/mercenaryhandler.h b/src/net/eathena/mercenaryhandler.h index 7d99ea197..197efdfc0 100644 --- a/src/net/eathena/mercenaryhandler.h +++ b/src/net/eathena/mercenaryhandler.h @@ -43,6 +43,8 @@ class MercenaryHandler final : public MessageHandler, void fire() override final; + void moveToMaster() const override final; + protected: void processMercenaryUpdate(Net::MessageIn &msg); diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index ad53b9269..698bddf59 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -418,6 +418,7 @@ #define CMSG_PET_MENU_ACTION 0x01a1 #define CMSG_HOMUNCULUS_SET_NAME 0x0231 +#define CMSG_HOMMERC_MOVE_TO_MASTER 0x0234 #define CMSG_DORI_DORI 0x01e7 #define CMSG_EXPLOSION_SPIRITS 0x01ed |