summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-09 21:47:47 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-09 21:47:47 +0300
commit9a215b52f97968426b4163da93f2820a3b9f8146 (patch)
tree41bac23955cb8edb4687a8fed81a1880d82874a5
parentd2f917c54af30d98302da7d913afbae5f8d91c4f (diff)
downloadplus-9a215b52f97968426b4163da93f2820a3b9f8146.tar.gz
plus-9a215b52f97968426b4163da93f2820a3b9f8146.tar.bz2
plus-9a215b52f97968426b4163da93f2820a3b9f8146.tar.xz
plus-9a215b52f97968426b4163da93f2820a3b9f8146.zip
eathena: add packet CMSG_NPC_REFINE 0x0222.
-rw-r--r--src/net/eathena/npchandler.cpp6
-rw-r--r--src/net/eathena/npchandler.h2
-rw-r--r--src/net/eathena/protocol.h1
-rw-r--r--src/net/npchandler.h2
-rw-r--r--src/net/tmwa/npchandler.cpp4
-rw-r--r--src/net/tmwa/npchandler.h2
6 files changed, 17 insertions, 0 deletions
diff --git a/src/net/eathena/npchandler.cpp b/src/net/eathena/npchandler.cpp
index f00b0fa07..bf6e874e1 100644
--- a/src/net/eathena/npchandler.cpp
+++ b/src/net/eathena/npchandler.cpp
@@ -223,6 +223,12 @@ void NpcHandler::repair(const int index) const
outMsg.writeInt16(static_cast<int16_t>(index), "index");
}
+void NpcHandler::refine(const int index) const
+{
+ MessageOut outMsg(CMSG_NPC_REFINE);
+ outMsg.writeInt32(index, "index");
+}
+
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 ae1eb32cf..285f8e0c2 100644
--- a/src/net/eathena/npchandler.h
+++ b/src/net/eathena/npchandler.h
@@ -77,6 +77,8 @@ class NpcHandler final : public MessageHandler, public Ea::NpcHandler
void repair(const int index) const override final;
+ void refine(const int index) 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 b26eb523c..64678961a 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -317,6 +317,7 @@
#define CMSG_NPC_PRODUCE_MIX 0x018e
#define CMSG_NPC_COOKING 0x025b
#define CMSG_NPC_REPAIR 0x01fd
+#define CMSG_NPC_REFINE 0x0222
#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 9bf8565e7..7504cc6b2 100644
--- a/src/net/npchandler.h
+++ b/src/net/npchandler.h
@@ -81,6 +81,8 @@ class NpcHandler notfinal
const int nameId) const = 0;
virtual void repair(const int index) const = 0;
+
+ virtual void refine(const int index) const = 0;
};
} // namespace Net
diff --git a/src/net/tmwa/npchandler.cpp b/src/net/tmwa/npchandler.cpp
index cd20cf87d..59fb6f78e 100644
--- a/src/net/tmwa/npchandler.cpp
+++ b/src/net/tmwa/npchandler.cpp
@@ -223,6 +223,10 @@ void NpcHandler::repair(const int index A_UNUSED) const
{
}
+void NpcHandler::refine(const int index 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 e7cfb7fb8..9d661172e 100644
--- a/src/net/tmwa/npchandler.h
+++ b/src/net/tmwa/npchandler.h
@@ -82,6 +82,8 @@ class NpcHandler final : public MessageHandler, public Ea::NpcHandler
const int nameId) const;
void repair(const int index) const override final;
+
+ void refine(const int index) const override final;
};
} // namespace TmwAthena