diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-08-23 22:00:27 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-08-24 21:08:16 +0300 |
commit | c2a7004213529c403faeb6fdcc374699aa2f53b5 (patch) | |
tree | f5701ef3412923bc0e5e033033bd52960d66acc3 /src/net/eathena | |
parent | e8a4474319aca4a32869fa1ebb8b5ebbd98237f6 (diff) | |
download | mv-c2a7004213529c403faeb6fdcc374699aa2f53b5.tar.gz mv-c2a7004213529c403faeb6fdcc374699aa2f53b5.tar.bz2 mv-c2a7004213529c403faeb6fdcc374699aa2f53b5.tar.xz mv-c2a7004213529c403faeb6fdcc374699aa2f53b5.zip |
improve getState/setState in Client.
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/charserverhandler.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/gamehandler.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/generalhandler.cpp | 6 | ||||
-rw-r--r-- | src/net/eathena/loginhandler.cpp | 8 |
4 files changed, 9 insertions, 9 deletions
diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp index 1d4928bc9..8c580ce3a 100644 --- a/src/net/eathena/charserverhandler.cpp +++ b/src/net/eathena/charserverhandler.cpp @@ -294,7 +294,7 @@ void CharServerHandler::processCharLogin(Net::MessageIn &msg) } } - Client::setState(STATE_CHAR_SELECT); + client->setState(STATE_CHAR_SELECT); } } // namespace EAthena diff --git a/src/net/eathena/gamehandler.cpp b/src/net/eathena/gamehandler.cpp index cdb3029bc..4b9bcb80f 100644 --- a/src/net/eathena/gamehandler.cpp +++ b/src/net/eathena/gamehandler.cpp @@ -107,7 +107,7 @@ void GameHandler::connect() static_cast<LoginHandler*>(Net::getLoginHandler())->getToken(); - if (Client::getState() == STATE_CONNECT_GAME) + if (client->getState() == STATE_CONNECT_GAME) { // Change the player's ID to the account ID to match what eAthena uses if (player_node) diff --git a/src/net/eathena/generalhandler.cpp b/src/net/eathena/generalhandler.cpp index 029b7fcd4..55b3b644f 100644 --- a/src/net/eathena/generalhandler.cpp +++ b/src/net/eathena/generalhandler.cpp @@ -133,7 +133,7 @@ void GeneralHandler::handleMessage(Net::MessageIn &msg) errorMessage = _("No servers available."); break; case 2: - if (Client::getState() == STATE_GAME) + if (client->getState() == STATE_GAME) { errorMessage = _("Someone else is trying to use this " "account."); @@ -153,7 +153,7 @@ void GeneralHandler::handleMessage(Net::MessageIn &msg) errorMessage = _("Unknown connection error."); break; } - Client::setState(STATE_ERROR); + client->setState(STATE_ERROR); break; } @@ -224,7 +224,7 @@ void GeneralHandler::flushNetwork() else errorMessage = _("Got disconnected from server!"); - Client::setState(STATE_ERROR); + client->setState(STATE_ERROR); } } diff --git a/src/net/eathena/loginhandler.cpp b/src/net/eathena/loginhandler.cpp index 91900b623..1ecfc2a51 100644 --- a/src/net/eathena/loginhandler.cpp +++ b/src/net/eathena/loginhandler.cpp @@ -167,8 +167,8 @@ void LoginHandler::processServerVersion(Net::MessageIn &msg) msg.readInt32(); mRegistrationEnabled = true; serverVersion = 0; - if (Client::getState() != STATE_LOGIN) - Client::setState(STATE_LOGIN); + if (client->getState() != STATE_LOGIN) + client->setState(STATE_LOGIN); // Leave this last mVersionResponse = true; @@ -193,8 +193,8 @@ void LoginHandler::processUpdateHost2(Net::MessageIn &msg) const logger->log("Received update hosts \"%s\" from login server.", updateHost.c_str()); - if (Client::getState() == STATE_PRE_LOGIN) - Client::setState(STATE_LOGIN); + if (client->getState() == STATE_PRE_LOGIN) + client->setState(STATE_LOGIN); } } // namespace EAthena |