summaryrefslogtreecommitdiff
path: root/src/net/ea
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-08-23 22:00:27 +0300
committerAndrei Karas <akaras@inbox.ru>2013-08-24 21:08:16 +0300
commitc2a7004213529c403faeb6fdcc374699aa2f53b5 (patch)
treef5701ef3412923bc0e5e033033bd52960d66acc3 /src/net/ea
parente8a4474319aca4a32869fa1ebb8b5ebbd98237f6 (diff)
downloadplus-c2a7004213529c403faeb6fdcc374699aa2f53b5.tar.gz
plus-c2a7004213529c403faeb6fdcc374699aa2f53b5.tar.bz2
plus-c2a7004213529c403faeb6fdcc374699aa2f53b5.tar.xz
plus-c2a7004213529c403faeb6fdcc374699aa2f53b5.zip
improve getState/setState in Client.
Diffstat (limited to 'src/net/ea')
-rw-r--r--src/net/ea/charserverhandler.cpp6
-rw-r--r--src/net/ea/gamehandler.cpp4
-rw-r--r--src/net/ea/loginhandler.cpp12
3 files changed, 11 insertions, 11 deletions
diff --git a/src/net/ea/charserverhandler.cpp b/src/net/ea/charserverhandler.cpp
index ef47cf99e..81beac26e 100644
--- a/src/net/ea/charserverhandler.cpp
+++ b/src/net/ea/charserverhandler.cpp
@@ -135,7 +135,7 @@ void CharServerHandler::processCharLoginError(Net::MessageIn &msg) const
errorMessage = _("Unknown char-server failure.");
break;
}
- Client::setState(STATE_ERROR);
+ client->setState(STATE_ERROR);
BLOCK_END("CharServerHandler::processCharLoginError")
}
@@ -261,7 +261,7 @@ void CharServerHandler::processCharMapInfo(Net::MessageIn &msg,
if (network)
network->disconnect();
- Client::setState(STATE_CONNECT_GAME);
+ client->setState(STATE_CONNECT_GAME);
BLOCK_END("CharServerHandler::processCharMapInfo")
}
@@ -283,7 +283,7 @@ void CharServerHandler::processChangeMapServer(Net::MessageIn &msg,
server.port = msg.readInt16();
network->disconnect();
- Client::setState(STATE_CHANGE_MAP);
+ client->setState(STATE_CHANGE_MAP);
if (player_node)
{
player_node->setTileCoords(x, y);
diff --git a/src/net/ea/gamehandler.cpp b/src/net/ea/gamehandler.cpp
index faee4b2d8..df2c4ec47 100644
--- a/src/net/ea/gamehandler.cpp
+++ b/src/net/ea/gamehandler.cpp
@@ -59,7 +59,7 @@ void GameHandler::processMapLogin(Net::MessageIn &msg) const
logger->log("Protocol: Player start position: (%d, %d),"
" Direction: %d", x, y, direction);
// Switch now or we'll have problems
- Client::setState(STATE_GAME);
+ client->setState(STATE_GAME);
if (player_node)
player_node->setTileCoords(x, y);
}
@@ -72,7 +72,7 @@ void GameHandler::processWhoAnswer(Net::MessageIn &msg) const
void GameHandler::processCharSwitchResponse(Net::MessageIn &msg) const
{
if (msg.readInt8())
- Client::setState(STATE_SWITCH_CHARACTER);
+ client->setState(STATE_SWITCH_CHARACTER);
}
void GameHandler::processMapQuitResponse(Net::MessageIn &msg) const
diff --git a/src/net/ea/loginhandler.cpp b/src/net/ea/loginhandler.cpp
index 2632aeb3b..fbe588b1f 100644
--- a/src/net/ea/loginhandler.cpp
+++ b/src/net/ea/loginhandler.cpp
@@ -61,7 +61,7 @@ bool LoginHandler::isRegistrationEnabled() const
void LoginHandler::getRegistrationDetails() const
{
// Not supported, so move on
- Client::setState(STATE_REGISTER);
+ client->setState(STATE_REGISTER);
}
void LoginHandler::loginAccount(LoginData *const loginData) const
@@ -93,7 +93,7 @@ void LoginHandler::chooseServer(const unsigned int server) const
charServer->port = mWorlds[server]->port;
}
- Client::setState(STATE_UPDATE);
+ client->setState(STATE_UPDATE);
}
void LoginHandler::registerAccount(LoginData *const loginData) const
@@ -139,7 +139,7 @@ void LoginHandler::procecessCharPasswordResponse(Net::MessageIn &msg) const
// Successful pass change
if (errMsg == 1)
{
- Client::setState(STATE_CHANGEPASSWORD_SUCCESS);
+ client->setState(STATE_CHANGEPASSWORD_SUCCESS);
}
// pass change failed
else
@@ -164,7 +164,7 @@ void LoginHandler::procecessCharPasswordResponse(Net::MessageIn &msg) const
errorMessage = _("Unknown error.");
break;
}
- Client::setState(STATE_ACCOUNTCHANGE_ERROR);
+ client->setState(STATE_ACCOUNTCHANGE_ERROR);
}
}
@@ -222,7 +222,7 @@ void LoginHandler::processLoginData(Net::MessageIn &msg)
mWorlds.push_back(world);
}
- Client::setState(STATE_WORLD_SELECT);
+ client->setState(STATE_WORLD_SELECT);
}
void LoginHandler::processLoginError(Net::MessageIn &msg) const
@@ -291,7 +291,7 @@ void LoginHandler::processLoginError(Net::MessageIn &msg) const
errorMessage = _("Unknown error.");
break;
}
- Client::setState(STATE_ERROR);
+ client->setState(STATE_ERROR);
}
void LoginHandler::logout() const