From 2092efd689b7a0881bc9c7b3038e5f2e53a1ba21 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 15 Sep 2014 10:56:49 +0300 Subject: eathena: add packet CMSG_ADMIN_REQUEST_STATS 0x0213. --- src/net/adminhandler.h | 2 ++ src/net/eathena/adminhandler.cpp | 10 +++++++++- src/net/eathena/adminhandler.h | 4 ++++ src/net/eathena/protocol.h | 1 + src/net/tmwa/adminhandler.cpp | 4 ++++ src/net/tmwa/adminhandler.h | 2 ++ 6 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/net/adminhandler.h b/src/net/adminhandler.h index 75d4f7340..e6565e4a6 100644 --- a/src/net/adminhandler.h +++ b/src/net/adminhandler.h @@ -88,6 +88,8 @@ class AdminHandler notfinal const int type) const = 0; virtual void unequipAll(const Being *const being) const = 0; + + virtual void requestStats(const std::string &name) = 0; }; } // namespace Net diff --git a/src/net/eathena/adminhandler.cpp b/src/net/eathena/adminhandler.cpp index 7ef2dc645..2883ff524 100644 --- a/src/net/eathena/adminhandler.cpp +++ b/src/net/eathena/adminhandler.cpp @@ -40,7 +40,8 @@ namespace EAthena AdminHandler::AdminHandler() : MessageHandler(), - Ea::AdminHandler() + Ea::AdminHandler(), + mStatsName() { static const uint16_t _messages[] = { @@ -198,4 +199,11 @@ void AdminHandler::processSetTileType(Net::MessageIn &msg) msg.readString(16, "map name"); } +void AdminHandler::requestStats(const std::string &name) +{ + mStatsName = name; + MessageOut outMsg(CMSG_ADMIN_REQUEST_STATS); + outMsg.writeString(name, 24); +} + } // namespace EAthena diff --git a/src/net/eathena/adminhandler.h b/src/net/eathena/adminhandler.h index 3a98e16bc..cfb33f7f4 100644 --- a/src/net/eathena/adminhandler.h +++ b/src/net/eathena/adminhandler.h @@ -73,10 +73,14 @@ class AdminHandler final : public MessageHandler, public Ea::AdminHandler void unequipAll(const Being *const being) const override final; + void requestStats(const std::string &name) override final; + protected: void processAdminGetLoginAck(Net::MessageIn &msg); void processSetTileType(Net::MessageIn &msg); + + std::string mStatsName; }; } // namespace EAthena diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index 97bc7c7e4..123b36ef0 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -316,6 +316,7 @@ #define CMSG_ADMIN_ID_TO_LOGIN 0x01df #define CMSG_ADMIN_SET_TILE_TYPE 0x0198 #define CMSG_ADMIN_UNEQUIP_ALL 0x07f5 +#define CMSG_ADMIN_REQUEST_STATS 0x0213 #define CMSG_GUILD_CHECK_MASTER 0x014d #define CMSG_GUILD_REQUEST_INFO 0x014f diff --git a/src/net/tmwa/adminhandler.cpp b/src/net/tmwa/adminhandler.cpp index fb7b284d0..1ad993002 100644 --- a/src/net/tmwa/adminhandler.cpp +++ b/src/net/tmwa/adminhandler.cpp @@ -152,4 +152,8 @@ void AdminHandler::unequipAll(const Being *const being A_UNUSED) const { } +void AdminHandler::requestStats(const std::string &name) +{ +} + } // namespace TmwAthena diff --git a/src/net/tmwa/adminhandler.h b/src/net/tmwa/adminhandler.h index de83c8c9c..b8f7456e6 100644 --- a/src/net/tmwa/adminhandler.h +++ b/src/net/tmwa/adminhandler.h @@ -72,6 +72,8 @@ class AdminHandler final : public MessageHandler, public Ea::AdminHandler const int type) const; void unequipAll(const Being *const being) const override final; + + void requestStats(const std::string &name) override final; }; } // namespace TmwAthena -- cgit v1.2.3-60-g2f50