diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-09 20:17:29 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-09 20:17:29 +0300 |
commit | 6b4beb683308a0df2d08c7ae499cffa0d87f5dae (patch) | |
tree | 2bd2c3064a1350f46302eadce733c0f03ef0820f /src | |
parent | 7ac2da363583a568256f5efc2ab58fa2b342b233 (diff) | |
download | manaverse-6b4beb683308a0df2d08c7ae499cffa0d87f5dae.tar.gz manaverse-6b4beb683308a0df2d08c7ae499cffa0d87f5dae.tar.bz2 manaverse-6b4beb683308a0df2d08c7ae499cffa0d87f5dae.tar.xz manaverse-6b4beb683308a0df2d08c7ae499cffa0d87f5dae.zip |
eathena: add packet CMSG_NPC_REPAIR 0x01fd.
Diffstat (limited to 'src')
-rw-r--r-- | src/net/eathena/npchandler.cpp | 6 | ||||
-rw-r--r-- | src/net/eathena/npchandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/protocol.h | 1 | ||||
-rw-r--r-- | src/net/npchandler.h | 2 | ||||
-rw-r--r-- | src/net/tmwa/npchandler.cpp | 4 | ||||
-rw-r--r-- | src/net/tmwa/npchandler.h | 2 |
6 files changed, 17 insertions, 0 deletions
diff --git a/src/net/eathena/npchandler.cpp b/src/net/eathena/npchandler.cpp index 3943d99c4..f00b0fa07 100644 --- a/src/net/eathena/npchandler.cpp +++ b/src/net/eathena/npchandler.cpp @@ -217,6 +217,12 @@ void NpcHandler::cooking(const CookingType::Type type, outMsg.writeInt16(nameId, "name id"); } +void NpcHandler::repair(const int index) const +{ + MessageOut outMsg(CMSG_NPC_REPAIR); + outMsg.writeInt16(static_cast<int16_t>(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 720a4c9f8..ae1eb32cf 100644 --- a/src/net/eathena/npchandler.h +++ b/src/net/eathena/npchandler.h @@ -75,6 +75,8 @@ class NpcHandler final : public MessageHandler, public Ea::NpcHandler void cooking(const CookingType::Type type, const int nameId) const override final; + void repair(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 941b8f6fc..b26eb523c 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -316,6 +316,7 @@ #define CMSG_NPC_COMPLETE_PROGRESS_BAR 0x02f1 #define CMSG_NPC_PRODUCE_MIX 0x018e #define CMSG_NPC_COOKING 0x025b +#define CMSG_NPC_REPAIR 0x01fd #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 33f0ae3a0..9bf8565e7 100644 --- a/src/net/npchandler.h +++ b/src/net/npchandler.h @@ -79,6 +79,8 @@ class NpcHandler notfinal virtual void cooking(const CookingType::Type type, const int nameId) const = 0; + + virtual void repair(const int index) const = 0; }; } // namespace Net diff --git a/src/net/tmwa/npchandler.cpp b/src/net/tmwa/npchandler.cpp index 8e691a808..c8a740fde 100644 --- a/src/net/tmwa/npchandler.cpp +++ b/src/net/tmwa/npchandler.cpp @@ -219,6 +219,10 @@ void NpcHandler::cooking(const CookingType::Type type, { } +void NpcHandler::repair(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 8cb2a531a..e7cfb7fb8 100644 --- a/src/net/tmwa/npchandler.h +++ b/src/net/tmwa/npchandler.h @@ -80,6 +80,8 @@ class NpcHandler final : public MessageHandler, public Ea::NpcHandler void cooking(const CookingType::Type type, const int nameId) const; + + void repair(const int index) const override final; }; } // namespace TmwAthena |