summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-22 13:40:46 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-22 13:40:46 +0300
commita45e11159f7df1a80d75e2a6defb559ebc375e4b (patch)
treed4894943a8b8da15624bcc59c650046fc7ba340b /src
parent95fdd4dab7a079eb67e98a02a8752631ce05dcab (diff)
downloadmv-a45e11159f7df1a80d75e2a6defb559ebc375e4b.tar.gz
mv-a45e11159f7df1a80d75e2a6defb559ebc375e4b.tar.bz2
mv-a45e11159f7df1a80d75e2a6defb559ebc375e4b.tar.xz
mv-a45e11159f7df1a80d75e2a6defb559ebc375e4b.zip
Send char server ping packets if server support it.
Diffstat (limited to 'src')
-rw-r--r--src/client.cpp22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 5d8978910..fd0672805 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -1800,16 +1800,22 @@ void Client::slowLogic()
if (get_elapsed_time1(mPing) > 1500)
{
mPing = tick_time;
- if (mState != STATE_UPDATE &&
- mState != STATE_LOGIN &&
- mState != STATE_LOGIN_ATTEMPT)
+ if (mState == STATE_UPDATE ||
+ mState == STATE_LOGIN ||
+ mState == STATE_LOGIN_ATTEMPT)
{
- return;
+ if (loginHandler)
+ loginHandler->ping();
+ if (generalHandler)
+ generalHandler->flushSend();
+ }
+ else if (mState == STATE_CHAR_SELECT)
+ {
+ if (charServerHandler)
+ charServerHandler->ping();
+ if (generalHandler)
+ generalHandler->flushSend();
}
- if (loginHandler)
- loginHandler->ping();
- if (generalHandler)
- generalHandler->flushSend();
}
}