summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-09 19:31:00 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-09 19:31:00 +0300
commite234316a0a46677f4523b7b91b5c1cdc22a4fea1 (patch)
treed62d94a5d365b284d4e179fba4b3c0399ffb4a7d
parentc2df86167db6b7a70ca9377b8a0953a2d3513cb8 (diff)
downloadManaVerse-e234316a0a46677f4523b7b91b5c1cdc22a4fea1.tar.gz
ManaVerse-e234316a0a46677f4523b7b91b5c1cdc22a4fea1.tar.bz2
ManaVerse-e234316a0a46677f4523b7b91b5c1cdc22a4fea1.tar.xz
ManaVerse-e234316a0a46677f4523b7b91b5c1cdc22a4fea1.zip
eathena: add packet CMSG_NPC_PRODUCE_MIX 0x018e.
-rw-r--r--src/net/eathena/npchandler.cpp12
-rw-r--r--src/net/eathena/npchandler.h5
-rw-r--r--src/net/eathena/protocol.h1
-rw-r--r--src/net/npchandler.h5
-rw-r--r--src/net/tmwa/npchandler.cpp7
-rw-r--r--src/net/tmwa/npchandler.h5
6 files changed, 35 insertions, 0 deletions
diff --git a/src/net/eathena/npchandler.cpp b/src/net/eathena/npchandler.cpp
index 3f844a025..be82548fd 100644
--- a/src/net/eathena/npchandler.cpp
+++ b/src/net/eathena/npchandler.cpp
@@ -197,6 +197,18 @@ void NpcHandler::completeProgressBar() const
MessageOut outMsg(CMSG_NPC_COMPLETE_PROGRESS_BAR);
}
+void NpcHandler::produceMix(const int nameId,
+ const int materialId1,
+ const int materialId2,
+ const int materialId3) const
+{
+ MessageOut outMsg(CMSG_NPC_PRODUCE_MIX);
+ outMsg.writeInt16(nameId, "name id");
+ outMsg.writeInt16(materialId1, "material 1");
+ outMsg.writeInt16(materialId2, "material 2");
+ outMsg.writeInt16(materialId3, "material 3");
+}
+
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 85c95e68e..96b1b5c87 100644
--- a/src/net/eathena/npchandler.h
+++ b/src/net/eathena/npchandler.h
@@ -67,6 +67,11 @@ class NpcHandler final : public MessageHandler, public Ea::NpcHandler
void completeProgressBar() const override final;
+ void produceMix(const int nameId,
+ const int materialId1,
+ const int materialId2,
+ const int materialId3) 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 31adc550f..0eb37cbe7 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -314,6 +314,7 @@
#define CMSG_REQUEST_RANKS 0x097c
#define CMSG_SET_SHORTCUTS 0x02ba
#define CMSG_NPC_COMPLETE_PROGRESS_BAR 0x02f1
+#define CMSG_NPC_PRODUCE_MIX 0x018e
#define CMSG_PLAYER_MAPMOVE 0x0140
#define CMSG_REMOVE_OPTION 0x012a
#define CMSG_PLAYER_SET_MEMO 0x011d
diff --git a/src/net/npchandler.h b/src/net/npchandler.h
index 4412a49f8..13942b80b 100644
--- a/src/net/npchandler.h
+++ b/src/net/npchandler.h
@@ -69,6 +69,11 @@ class NpcHandler notfinal
virtual void endShopping(const int beingId) const = 0;
virtual void completeProgressBar() const = 0;
+
+ virtual void produceMix(const int nameId,
+ const int materialId1,
+ const int materialId2,
+ const int materialId3) const = 0;
};
} // namespace Net
diff --git a/src/net/tmwa/npchandler.cpp b/src/net/tmwa/npchandler.cpp
index 0e2701f44..474fa1411 100644
--- a/src/net/tmwa/npchandler.cpp
+++ b/src/net/tmwa/npchandler.cpp
@@ -207,6 +207,13 @@ void NpcHandler::completeProgressBar() const
{
}
+void NpcHandler::produceMix(const int nameId A_UNUSED,
+ const int materialId1 A_UNUSED,
+ const int materialId2 A_UNUSED,
+ const int materialId3 A_UNUSED) const
+{
+}
+
int NpcHandler::getNpc(Net::MessageIn &msg)
{
if (msg.getId() == SMSG_NPC_CHOICE
diff --git a/src/net/tmwa/npchandler.h b/src/net/tmwa/npchandler.h
index 2d53414e6..01aba1e96 100644
--- a/src/net/tmwa/npchandler.h
+++ b/src/net/tmwa/npchandler.h
@@ -72,6 +72,11 @@ class NpcHandler final : public MessageHandler, public Ea::NpcHandler
void processNpcCommand(Net::MessageIn &msg);
void processChangeTitle(Net::MessageIn &msg);
+
+ void produceMix(const int nameId,
+ const int materialId1,
+ const int materialId2,
+ const int materialId3) const override final;
};
} // namespace TmwAthena