From 605691e70927a3b44064562f7507c14e4600c3d3 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 9 Sep 2014 22:46:03 +0300 Subject: eathena: add packet CMSG_NPC_IDENTIFY 0x0178. --- src/net/eathena/npchandler.cpp | 6 ++++++ src/net/eathena/npchandler.h | 2 ++ src/net/eathena/protocol.h | 1 + src/net/npchandler.h | 2 ++ src/net/tmwa/npchandler.cpp | 4 ++++ src/net/tmwa/npchandler.h | 2 ++ 6 files changed, 17 insertions(+) diff --git a/src/net/eathena/npchandler.cpp b/src/net/eathena/npchandler.cpp index bf6e874e1..33fbbea43 100644 --- a/src/net/eathena/npchandler.cpp +++ b/src/net/eathena/npchandler.cpp @@ -229,6 +229,12 @@ void NpcHandler::refine(const int index) const outMsg.writeInt32(index, "index"); } +void NpcHandler::identify(const int index) const +{ + MessageOut outMsg(CMSG_NPC_IDENTIFY); + outMsg.writeInt16(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 285f8e0c2..5bf7ae0c0 100644 --- a/src/net/eathena/npchandler.h +++ b/src/net/eathena/npchandler.h @@ -81,6 +81,8 @@ class NpcHandler final : public MessageHandler, public Ea::NpcHandler int getNpc(Net::MessageIn &msg) override final; + void identify(const int index) const override final; + protected: static void processNpcCutin(Net::MessageIn &msg); diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index 64678961a..3aa0471af 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -318,6 +318,7 @@ #define CMSG_NPC_COOKING 0x025b #define CMSG_NPC_REPAIR 0x01fd #define CMSG_NPC_REFINE 0x0222 +#define CMSG_NPC_IDENTIFY 0x0178 #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 7504cc6b2..6aa0f5b01 100644 --- a/src/net/npchandler.h +++ b/src/net/npchandler.h @@ -83,6 +83,8 @@ class NpcHandler notfinal virtual void repair(const int index) const = 0; virtual void refine(const int index) const = 0; + + virtual void identify(const int index) const = 0; }; } // namespace Net diff --git a/src/net/tmwa/npchandler.cpp b/src/net/tmwa/npchandler.cpp index 59fb6f78e..6c29e6d73 100644 --- a/src/net/tmwa/npchandler.cpp +++ b/src/net/tmwa/npchandler.cpp @@ -227,6 +227,10 @@ void NpcHandler::refine(const int index A_UNUSED) const { } +void NpcHandler::identify(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 9d661172e..3b69cf58b 100644 --- a/src/net/tmwa/npchandler.h +++ b/src/net/tmwa/npchandler.h @@ -84,6 +84,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; + + void identify(const int index) const override final; }; } // namespace TmwAthena -- cgit v1.2.3-60-g2f50