summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-09 20:00:59 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-09 20:00:59 +0300
commit7ac2da363583a568256f5efc2ab58fa2b342b233 (patch)
treeed99f960b5b5c6cbaa7a7ca9db19f3dedb43bf33 /src/net/eathena
parent0e58c7c1df7d4e02b1dc06d5ee40bd7ab25ef284 (diff)
downloadplus-7ac2da363583a568256f5efc2ab58fa2b342b233.tar.gz
plus-7ac2da363583a568256f5efc2ab58fa2b342b233.tar.bz2
plus-7ac2da363583a568256f5efc2ab58fa2b342b233.tar.xz
plus-7ac2da363583a568256f5efc2ab58fa2b342b233.zip
eathena: add packet CMSG_NPC_COOKING 0x025b.
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/npchandler.cpp8
-rw-r--r--src/net/eathena/npchandler.h3
-rw-r--r--src/net/eathena/protocol.h1
3 files changed, 12 insertions, 0 deletions
diff --git a/src/net/eathena/npchandler.cpp b/src/net/eathena/npchandler.cpp
index be82548fd..3943d99c4 100644
--- a/src/net/eathena/npchandler.cpp
+++ b/src/net/eathena/npchandler.cpp
@@ -209,6 +209,14 @@ void NpcHandler::produceMix(const int nameId,
outMsg.writeInt16(materialId3, "material 3");
}
+void NpcHandler::cooking(const CookingType::Type type,
+ const int nameId) const
+{
+ MessageOut outMsg(CMSG_NPC_COOKING);
+ outMsg.writeInt16(static_cast<int16_t>(type), "type");
+ outMsg.writeInt16(nameId, "name id");
+}
+
int NpcHandler::getNpc(Net::MessageIn &msg)
{
if (msg.getId() == SMSG_NPC_CHOICE
diff --git a/src/net/eathena/npchandler.h b/src/net/eathena/npchandler.h
index 96b1b5c87..720a4c9f8 100644
--- a/src/net/eathena/npchandler.h
+++ b/src/net/eathena/npchandler.h
@@ -72,6 +72,9 @@ class NpcHandler final : public MessageHandler, public Ea::NpcHandler
const int materialId2,
const int materialId3) const override final;
+ void cooking(const CookingType::Type type,
+ const int nameId) const override final;
+
int getNpc(Net::MessageIn &msg) override final;
protected:
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index 0eb37cbe7..941b8f6fc 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -315,6 +315,7 @@
#define CMSG_SET_SHORTCUTS 0x02ba
#define CMSG_NPC_COMPLETE_PROGRESS_BAR 0x02f1
#define CMSG_NPC_PRODUCE_MIX 0x018e
+#define CMSG_NPC_COOKING 0x025b
#define CMSG_PLAYER_MAPMOVE 0x0140
#define CMSG_REMOVE_OPTION 0x012a
#define CMSG_PLAYER_SET_MEMO 0x011d