summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/net/eathena/homunculushandler.cpp14
-rw-r--r--src/net/eathena/homunculushandler.h4
-rw-r--r--src/net/eathena/protocol.h1
-rw-r--r--src/net/homunculushandler.h4
-rw-r--r--src/net/tmwa/homunculushandler.cpp8
-rw-r--r--src/net/tmwa/homunculushandler.h4
6 files changed, 35 insertions, 0 deletions
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