summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-15 10:56:49 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-15 11:08:52 +0300
commit2092efd689b7a0881bc9c7b3038e5f2e53a1ba21 (patch)
treeb19507096c3fffa8cdc99e57c897d4e6e1f9a014 /src/net
parentfcd38e8269205f062e27ea42d5107e5700023ff3 (diff)
downloadmv-2092efd689b7a0881bc9c7b3038e5f2e53a1ba21.tar.gz
mv-2092efd689b7a0881bc9c7b3038e5f2e53a1ba21.tar.bz2
mv-2092efd689b7a0881bc9c7b3038e5f2e53a1ba21.tar.xz
mv-2092efd689b7a0881bc9c7b3038e5f2e53a1ba21.zip
eathena: add packet CMSG_ADMIN_REQUEST_STATS 0x0213.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/adminhandler.h2
-rw-r--r--src/net/eathena/adminhandler.cpp10
-rw-r--r--src/net/eathena/adminhandler.h4
-rw-r--r--src/net/eathena/protocol.h1
-rw-r--r--src/net/tmwa/adminhandler.cpp4
-rw-r--r--src/net/tmwa/adminhandler.h2
6 files changed, 22 insertions, 1 deletions
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