From 74b96285c2ad2f07af0af9f8926bcd5e253dcde9 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 25 Sep 2014 16:54:25 +0300 Subject: eathena: add packet CMSG_HOMMERC_MOVE_TO 0x0232. --- src/net/eathena/homunculushandler.cpp | 10 ++++++++++ src/net/eathena/homunculushandler.h | 2 ++ src/net/eathena/mercenaryhandler.cpp | 10 ++++++++++ src/net/eathena/mercenaryhandler.h | 2 ++ src/net/eathena/protocol.h | 1 + 5 files changed, 25 insertions(+) (limited to 'src/net/eathena') diff --git a/src/net/eathena/homunculushandler.cpp b/src/net/eathena/homunculushandler.cpp index 54c64cf59..320af387e 100644 --- a/src/net/eathena/homunculushandler.cpp +++ b/src/net/eathena/homunculushandler.cpp @@ -194,4 +194,14 @@ void HomunculusHandler::moveToMaster() const outMsg.writeInt32(id); } +void HomunculusHandler::move(const int x, const int y) const +{ + const int id = PlayerInfo::getHomunculusId(); + if (!id) + return; + createOutPacket(CMSG_HOMMERC_MOVE_TO); + outMsg.writeInt32(id); + outMsg.writeCoordinates(x, y, 0U); +} + } // namespace EAthena diff --git a/src/net/eathena/homunculushandler.h b/src/net/eathena/homunculushandler.h index 627561655..01cb0586f 100644 --- a/src/net/eathena/homunculushandler.h +++ b/src/net/eathena/homunculushandler.h @@ -43,6 +43,8 @@ class HomunculusHandler final : public MessageHandler, void moveToMaster() const override final; + void move(const int x, const int y) const override final; + protected: void processHomunculusSkills(Net::MessageIn &msg); diff --git a/src/net/eathena/mercenaryhandler.cpp b/src/net/eathena/mercenaryhandler.cpp index dae3f1836..1ec3628a8 100644 --- a/src/net/eathena/mercenaryhandler.cpp +++ b/src/net/eathena/mercenaryhandler.cpp @@ -195,4 +195,14 @@ void MercenaryHandler::moveToMaster() const outMsg.writeInt32(id); } +void MercenaryHandler::move(const int x, const int y) const +{ + const int id = PlayerInfo::getMercenaryId(); + if (!id) + return; + createOutPacket(CMSG_HOMMERC_MOVE_TO); + outMsg.writeInt32(id); + outMsg.writeCoordinates(x, y, 0U); +} + } // namespace EAthena diff --git a/src/net/eathena/mercenaryhandler.h b/src/net/eathena/mercenaryhandler.h index 197efdfc0..06fdd7cec 100644 --- a/src/net/eathena/mercenaryhandler.h +++ b/src/net/eathena/mercenaryhandler.h @@ -45,6 +45,8 @@ class MercenaryHandler final : public MessageHandler, void moveToMaster() const override final; + void move(const int x, const int y) const override final; + protected: void processMercenaryUpdate(Net::MessageIn &msg); diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index 698bddf59..c1df2d1e6 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -419,6 +419,7 @@ #define CMSG_HOMUNCULUS_SET_NAME 0x0231 #define CMSG_HOMMERC_MOVE_TO_MASTER 0x0234 +#define CMSG_HOMMERC_MOVE_TO 0x0232 #define CMSG_DORI_DORI 0x01e7 #define CMSG_EXPLOSION_SPIRITS 0x01ed -- cgit v1.2.3-70-g09d2