summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-12-23 13:10:04 +0300
committerAndrei Karas <akaras@inbox.ru>2013-12-23 13:10:04 +0300
commit5a7c138016cf021361a21b7243f6124ea4855da8 (patch)
treeab8ccd52e37a9e5605cde34ba83f95207feb3ef9
parent33382dded24e2cfec454ff204a8fffbff9bd0fed (diff)
downloadmv-5a7c138016cf021361a21b7243f6124ea4855da8.tar.gz
mv-5a7c138016cf021361a21b7243f6124ea4855da8.tar.bz2
mv-5a7c138016cf021361a21b7243f6124ea4855da8.tar.xz
mv-5a7c138016cf021361a21b7243f6124ea4855da8.zip
show connection dialog before actual network actions.
-rw-r--r--src/client.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/client.cpp b/src/client.cpp
index b16ad2a22..483b260ee 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -1292,11 +1292,11 @@ int Client::gameExec()
case STATE_LOGIN_ATTEMPT:
BLOCK_START("Client::gameExec STATE_LOGIN_ATTEMPT")
logger->log1("State: LOGIN ATTEMPT");
- accountLogin(&loginData);
mCurrentDialog = new ConnectionDialog(
// TRANSLATORS: connection dialog header
_("Logging in"), STATE_SWITCH_SERVER);
mCurrentDialog->postInit();
+ accountLogin(&loginData);
BLOCK_END("Client::gameExec STATE_LOGIN_ATTEMPT")
break;
@@ -1457,12 +1457,12 @@ int Client::gameExec()
case STATE_GET_CHARACTERS:
BLOCK_START("Client::gameExec STATE_GET_CHARACTERS")
logger->log1("State: GET CHARACTERS");
- Net::getCharServerHandler()->requestCharacters();
mCurrentDialog = new ConnectionDialog(
// TRANSLATORS: connection dialog header
_("Requesting characters"),
STATE_SWITCH_SERVER);
mCurrentDialog->postInit();
+ Net::getCharServerHandler()->requestCharacters();
BLOCK_END("Client::gameExec STATE_GET_CHARACTERS")
break;
@@ -1497,27 +1497,25 @@ int Client::gameExec()
case STATE_CONNECT_GAME:
BLOCK_START("Client::gameExec STATE_CONNECT_GAME")
logger->log1("State: CONNECT GAME");
-
- Net::getGameHandler()->connect();
mCurrentDialog = new ConnectionDialog(
// TRANSLATORS: connection dialog header
_("Connecting to the game server"),
Net::getNetworkType() != ServerInfo::MANASERV ?
STATE_CHOOSE_SERVER : STATE_SWITCH_CHARACTER);
mCurrentDialog->postInit();
+ Net::getGameHandler()->connect();
BLOCK_END("Client::gameExec STATE_CONNECT_GAME")
break;
case STATE_CHANGE_MAP:
BLOCK_START("Client::gameExec STATE_CHANGE_MAP")
logger->log1("State: CHANGE_MAP");
-
- Net::getGameHandler()->connect();
mCurrentDialog = new ConnectionDialog(
// TRANSLATORS: connection dialog header
_("Changing game servers"),
STATE_SWITCH_CHARACTER);
mCurrentDialog->postInit();
+ Net::getGameHandler()->connect();
BLOCK_END("Client::gameExec STATE_CHANGE_MAP")
break;
@@ -1596,11 +1594,11 @@ int Client::gameExec()
case STATE_REGISTER_PREP:
BLOCK_START("Client::gameExec STATE_REGISTER_PREP")
logger->log1("State: REGISTER_PREP");
- Net::getLoginHandler()->getRegistrationDetails();
mCurrentDialog = new ConnectionDialog(
// TRANSLATORS: connection dialog header
_("Requesting registration details"), STATE_LOGIN);
mCurrentDialog->postInit();
+ Net::getLoginHandler()->getRegistrationDetails();
BLOCK_END("Client::gameExec STATE_REGISTER_PREP")
break;