summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-22 01:28:21 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-22 01:28:21 +0300
commita39ca8e69e759daca60bd7f6cb2d5cb827d98893 (patch)
treeb149b952dbbbe98f89387cde088676d5d984ea2c /src/net
parentfbbf0771c39c27473e9b1b579aef68ab706fde50 (diff)
downloadplus-a39ca8e69e759daca60bd7f6cb2d5cb827d98893.tar.gz
plus-a39ca8e69e759daca60bd7f6cb2d5cb827d98893.tar.bz2
plus-a39ca8e69e759daca60bd7f6cb2d5cb827d98893.tar.xz
plus-a39ca8e69e759daca60bd7f6cb2d5cb827d98893.zip
eathena: add packet CMSG_LOGIN_PING 0x0200.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/loginhandler.cpp11
-rw-r--r--src/net/eathena/loginhandler.h2
-rw-r--r--src/net/eathena/protocol.h1
-rw-r--r--src/net/loginhandler.h2
-rw-r--r--src/net/tmwa/loginhandler.cpp4
-rw-r--r--src/net/tmwa/loginhandler.h2
6 files changed, 22 insertions, 0 deletions
diff --git a/src/net/eathena/loginhandler.cpp b/src/net/eathena/loginhandler.cpp
index fe10fc335..35797b21a 100644
--- a/src/net/eathena/loginhandler.cpp
+++ b/src/net/eathena/loginhandler.cpp
@@ -284,4 +284,15 @@ int LoginHandler::supportedOptionalActions() const
: Net::RegistrationOptions::SetGenderOnRegister;
}
+void LoginHandler::ping() const
+{
+ createOutPacket(CMSG_LOGIN_PING);
+ outMsg.writeInt32(0, "unused");
+ outMsg.writeInt32(0, "unused");
+ outMsg.writeInt32(0, "unused");
+ outMsg.writeInt32(0, "unused");
+ outMsg.writeInt32(0, "unused");
+ outMsg.writeInt32(0, "unused");
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/loginhandler.h b/src/net/eathena/loginhandler.h
index 918d5c66d..c1543e627 100644
--- a/src/net/eathena/loginhandler.h
+++ b/src/net/eathena/loginhandler.h
@@ -61,6 +61,8 @@ class LoginHandler final : public MessageHandler, public Ea::LoginHandler
int supportedOptionalActions() const override final A_WARN_UNUSED;
+ void ping() const override final;
+
protected:
static void processLoginError2(Net::MessageIn &msg);
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index b8667be22..a8317c988 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -479,6 +479,7 @@
#define CMSG_MAP_SERVER_CONNECT 0x089c
#define CMSG_MAP_PING 0x035f /**< Send to server with tick */
+#define CMSG_LOGIN_PING 0x0200
#define CMSG_MAP_LOADED 0x007d
#define CMSG_CLIENT_QUIT 0x018A
diff --git a/src/net/loginhandler.h b/src/net/loginhandler.h
index c7dee1fcc..410eb858b 100644
--- a/src/net/loginhandler.h
+++ b/src/net/loginhandler.h
@@ -95,6 +95,8 @@ class LoginHandler notfinal
virtual void sendVersion() const = 0;
+ virtual void ping() const = 0;
+
virtual ~LoginHandler()
{ }
diff --git a/src/net/tmwa/loginhandler.cpp b/src/net/tmwa/loginhandler.cpp
index 62ba4f188..0007f0ffb 100644
--- a/src/net/tmwa/loginhandler.cpp
+++ b/src/net/tmwa/loginhandler.cpp
@@ -290,4 +290,8 @@ void LoginHandler::processCharPasswordResponse(Net::MessageIn &msg)
}
}
+void LoginHandler::ping() const
+{
+}
+
} // namespace TmwAthena
diff --git a/src/net/tmwa/loginhandler.h b/src/net/tmwa/loginhandler.h
index fa27859c7..fba17a8ae 100644
--- a/src/net/tmwa/loginhandler.h
+++ b/src/net/tmwa/loginhandler.h
@@ -61,6 +61,8 @@ class LoginHandler final : public MessageHandler, public Ea::LoginHandler
void sendVersion() const override final;
+ void ping() const override final;
+
static void requestUpdateHosts();
private: