summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-22 12:26:55 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-22 12:26:55 +0300
commit95fdd4dab7a079eb67e98a02a8752631ce05dcab (patch)
treee62efbe4da4d1c21013b7cad8862d34253fbc2cb /src
parent0e7aa4918ba0a6dd94076e5f75725faabe483f69 (diff)
downloadplus-95fdd4dab7a079eb67e98a02a8752631ce05dcab.tar.gz
plus-95fdd4dab7a079eb67e98a02a8752631ce05dcab.tar.bz2
plus-95fdd4dab7a079eb67e98a02a8752631ce05dcab.tar.xz
plus-95fdd4dab7a079eb67e98a02a8752631ce05dcab.zip
eathena: add packet CMSG_CHAR_PING 0x0187.
Diffstat (limited to 'src')
-rw-r--r--src/net/charserverhandler.h2
-rw-r--r--src/net/eathena/charserverhandler.cpp6
-rw-r--r--src/net/eathena/charserverhandler.h2
-rw-r--r--src/net/eathena/protocol.h1
-rw-r--r--src/net/tmwa/charserverhandler.cpp4
-rw-r--r--src/net/tmwa/charserverhandler.h2
6 files changed, 17 insertions, 0 deletions
diff --git a/src/net/charserverhandler.h b/src/net/charserverhandler.h
index d8c14a4de..30bc1b627 100644
--- a/src/net/charserverhandler.h
+++ b/src/net/charserverhandler.h
@@ -88,6 +88,8 @@ class CharServerHandler notfinal
Net::Character *const character,
const bool withColors) const = 0;
+ virtual void ping() const = 0;
+
protected:
CharServerHandler()
{
diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp
index 79a316420..533f8f633 100644
--- a/src/net/eathena/charserverhandler.cpp
+++ b/src/net/eathena/charserverhandler.cpp
@@ -707,4 +707,10 @@ void CharServerHandler::processCharCharacters(Net::MessageIn &msg)
client->setState(STATE_CHAR_SELECT);
}
+void CharServerHandler::ping() const
+{
+ createOutPacket(CMSG_CHAR_PING);
+ outMsg.writeInt32(0, "unused");
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/charserverhandler.h b/src/net/eathena/charserverhandler.h
index 6d0cb48a9..2fd4d55f7 100644
--- a/src/net/eathena/charserverhandler.h
+++ b/src/net/eathena/charserverhandler.h
@@ -89,6 +89,8 @@ class CharServerHandler final : public MessageHandler,
Net::Character *const character,
const bool) const override final;
+ void ping() const override final;
+
protected:
static void processPincodeStatus(Net::MessageIn &msg);
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index a8317c988..7ec70ff83 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -480,6 +480,7 @@
#define CMSG_MAP_SERVER_CONNECT 0x089c
#define CMSG_MAP_PING 0x035f /**< Send to server with tick */
#define CMSG_LOGIN_PING 0x0200
+#define CMSG_CHAR_PING 0x0187
#define CMSG_MAP_LOADED 0x007d
#define CMSG_CLIENT_QUIT 0x018A
diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp
index 26b24f07a..d819e19e4 100644
--- a/src/net/tmwa/charserverhandler.cpp
+++ b/src/net/tmwa/charserverhandler.cpp
@@ -538,4 +538,8 @@ void CharServerHandler::processCharDeleteFailed(Net::MessageIn &msg)
BLOCK_END("CharServerHandler::processCharDeleteFailed")
}
+void CharServerHandler::ping() const
+{
+}
+
} // namespace TmwAthena
diff --git a/src/net/tmwa/charserverhandler.h b/src/net/tmwa/charserverhandler.h
index 28d73110d..c89cac22f 100644
--- a/src/net/tmwa/charserverhandler.h
+++ b/src/net/tmwa/charserverhandler.h
@@ -90,6 +90,8 @@ class CharServerHandler final : public MessageHandler,
Net::Character *const character,
const bool withColors) const override final;
+ void ping() const override final;
+
protected:
static void processCharCreate(Net::MessageIn &msg);