From a45e11159f7df1a80d75e2a6defb559ebc375e4b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 22 Mar 2015 13:40:46 +0300 Subject: Send char server ping packets if server support it. --- src/client.cpp | 22 ++++++++++++++-------- 1 file 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(); } } -- cgit v1.2.3-70-g09d2