From bdcc5c75d62f1c8f7dc61604a922a3cc3541d62b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 25 Sep 2014 17:26:54 +0300 Subject: eathena: add packet CMSG_HOMUNCULUS_MENU 0x022d. --- src/net/eathena/homunculushandler.cpp | 14 ++++++++++++++ src/net/eathena/homunculushandler.h | 4 ++++ src/net/eathena/protocol.h | 1 + src/net/homunculushandler.h | 4 ++++ src/net/tmwa/homunculushandler.cpp | 8 ++++++++ src/net/tmwa/homunculushandler.h | 4 ++++ 6 files changed, 35 insertions(+) (limited to 'src') diff --git a/src/net/eathena/homunculushandler.cpp b/src/net/eathena/homunculushandler.cpp index bbddc4412..5a6d3e5fa 100644 --- a/src/net/eathena/homunculushandler.cpp +++ b/src/net/eathena/homunculushandler.cpp @@ -215,4 +215,18 @@ void HomunculusHandler::attack(const int targetId, const bool keep) const outMsg.writeInt8(keep ? 1 : 0); } +void HomunculusHandler::feed() const +{ + createOutPacket(CMSG_HOMUNCULUS_MENU); + outMsg.writeInt16(0, "type"); + outMsg.writeInt8(1, "command"); // feed +} + +void HomunculusHandler::fire() const +{ + createOutPacket(CMSG_HOMUNCULUS_MENU); + outMsg.writeInt16(0, "type"); + outMsg.writeInt8(2, "command"); // delete +} + } // namespace EAthena diff --git a/src/net/eathena/homunculushandler.h b/src/net/eathena/homunculushandler.h index 53ad59f4a..3b7a82ace 100644 --- a/src/net/eathena/homunculushandler.h +++ b/src/net/eathena/homunculushandler.h @@ -47,6 +47,10 @@ class HomunculusHandler final : public MessageHandler, void attack(const int targetId, const bool keep) const override final; + void feed() const override final; + + void fire() const override final; + protected: void processHomunculusSkills(Net::MessageIn &msg); diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index 65257b904..13a5f5132 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_HOMUNCULUS_MENU 0x022d #define CMSG_HOMMERC_MOVE_TO_MASTER 0x0234 #define CMSG_HOMMERC_MOVE_TO 0x0232 #define CMSG_HOMMERC_ATTACK 0x0233 diff --git a/src/net/homunculushandler.h b/src/net/homunculushandler.h index a5db18ba8..e45f4d7f1 100644 --- a/src/net/homunculushandler.h +++ b/src/net/homunculushandler.h @@ -41,6 +41,10 @@ class HomunculusHandler notfinal virtual void move(const int x, const int y) const = 0; virtual void attack(const int targetId, const bool keep) const = 0; + + virtual void feed() const = 0; + + virtual void fire() const = 0; }; } // namespace Net diff --git a/src/net/tmwa/homunculushandler.cpp b/src/net/tmwa/homunculushandler.cpp index 727053e17..2bc5c4493 100644 --- a/src/net/tmwa/homunculushandler.cpp +++ b/src/net/tmwa/homunculushandler.cpp @@ -59,4 +59,12 @@ void HomunculusHandler::attack(const int targetId A_UNUSED, { } +void HomunculusHandler::feed() const +{ +} + +void HomunculusHandler::fire() const +{ +} + } // namespace TmwAthena diff --git a/src/net/tmwa/homunculushandler.h b/src/net/tmwa/homunculushandler.h index 2b9935325..9ce94cefa 100644 --- a/src/net/tmwa/homunculushandler.h +++ b/src/net/tmwa/homunculushandler.h @@ -45,6 +45,10 @@ class HomunculusHandler final : public MessageHandler, void move(const int x, const int y) const override final; void attack(const int targetId, const bool keep) const override final; + + void feed() const override final; + + void fire() const override final; }; } // namespace TmwAthena -- cgit v1.2.3-70-g09d2