diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-25 16:54:25 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-25 17:03:55 +0300 |
commit | 74b96285c2ad2f07af0af9f8926bcd5e253dcde9 (patch) | |
tree | 6569048c204a9df2aa03a26e456ed5d3ee4bfe74 /src/net | |
parent | d5fa4f03b3f09efd0551b0dfd8bc2dc7de4d4acc (diff) | |
download | ManaVerse-74b96285c2ad2f07af0af9f8926bcd5e253dcde9.tar.gz ManaVerse-74b96285c2ad2f07af0af9f8926bcd5e253dcde9.tar.bz2 ManaVerse-74b96285c2ad2f07af0af9f8926bcd5e253dcde9.tar.xz ManaVerse-74b96285c2ad2f07af0af9f8926bcd5e253dcde9.zip |
eathena: add packet CMSG_HOMMERC_MOVE_TO 0x0232.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/eathena/homunculushandler.cpp | 10 | ||||
-rw-r--r-- | src/net/eathena/homunculushandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/mercenaryhandler.cpp | 10 | ||||
-rw-r--r-- | src/net/eathena/mercenaryhandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/protocol.h | 1 | ||||
-rw-r--r-- | src/net/homunculushandler.h | 2 | ||||
-rw-r--r-- | src/net/mercenaryhandler.h | 2 | ||||
-rw-r--r-- | src/net/tmwa/homunculushandler.cpp | 4 | ||||
-rw-r--r-- | src/net/tmwa/homunculushandler.h | 2 | ||||
-rw-r--r-- | src/net/tmwa/mercenaryhandler.cpp | 4 | ||||
-rw-r--r-- | src/net/tmwa/mercenaryhandler.h | 2 |
11 files changed, 41 insertions, 0 deletions
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 diff --git a/src/net/homunculushandler.h b/src/net/homunculushandler.h index 09ee9e48a..2d7bb7d0d 100644 --- a/src/net/homunculushandler.h +++ b/src/net/homunculushandler.h @@ -37,6 +37,8 @@ class HomunculusHandler notfinal virtual void setName(const std::string &name) const = 0; virtual void moveToMaster() const = 0; + + virtual void move(const int x, const int y) const = 0; }; } // namespace Net diff --git a/src/net/mercenaryhandler.h b/src/net/mercenaryhandler.h index 85e72b02f..ef1f60a45 100644 --- a/src/net/mercenaryhandler.h +++ b/src/net/mercenaryhandler.h @@ -39,6 +39,8 @@ class MercenaryHandler notfinal virtual void fire() = 0; virtual void moveToMaster() const = 0; + + virtual void move(const int x, const int y) const = 0; }; } // namespace Net diff --git a/src/net/tmwa/homunculushandler.cpp b/src/net/tmwa/homunculushandler.cpp index b0760454e..598aed30e 100644 --- a/src/net/tmwa/homunculushandler.cpp +++ b/src/net/tmwa/homunculushandler.cpp @@ -50,4 +50,8 @@ void HomunculusHandler::moveToMaster() const { } +void HomunculusHandler::move(const int x A_UNUSED, const int y A_UNUSED) const +{ +} + } // namespace TmwAthena diff --git a/src/net/tmwa/homunculushandler.h b/src/net/tmwa/homunculushandler.h index d5c4d1b72..41a3e3426 100644 --- a/src/net/tmwa/homunculushandler.h +++ b/src/net/tmwa/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; + + void move(const int x, const int y) const override final; }; } // namespace TmwAthena diff --git a/src/net/tmwa/mercenaryhandler.cpp b/src/net/tmwa/mercenaryhandler.cpp index 64f91dc1a..de4ca5f7e 100644 --- a/src/net/tmwa/mercenaryhandler.cpp +++ b/src/net/tmwa/mercenaryhandler.cpp @@ -54,4 +54,8 @@ void MercenaryHandler::moveToMaster() const { } +void MercenaryHandler::move(const int x A_UNUSED, const int y A_UNUSED) const +{ +} + } // namespace TmwAthena diff --git a/src/net/tmwa/mercenaryhandler.h b/src/net/tmwa/mercenaryhandler.h index b9f8d9c07..e327247df 100644 --- a/src/net/tmwa/mercenaryhandler.h +++ b/src/net/tmwa/mercenaryhandler.h @@ -43,6 +43,8 @@ class MercenaryHandler final : public MessageHandler, void fire() override final; void moveToMaster() const override final; + + void move(const int x, const int y) const override final; }; } // namespace TmwAthena |