diff options
author | Stefan Dombrowski <stefan@uni-bonn.de> | 2010-10-13 13:40:41 +0200 |
---|---|---|
committer | Stefan Dombrowski <stefan@uni-bonn.de> | 2010-10-13 13:40:41 +0200 |
commit | c1b7d619971ea3dc7f644c86090a9ac518e44fb1 (patch) | |
tree | 1db48b96f93732eecce022ecd2e7f3d9f5ef56c5 /src/client.cpp | |
parent | f9ca4759d3dab9515bc3c1cb9b7e2bac97d1f71f (diff) | |
download | mana-c1b7d619971ea3dc7f644c86090a9ac518e44fb1.tar.gz mana-c1b7d619971ea3dc7f644c86090a9ac518e44fb1.tar.bz2 mana-c1b7d619971ea3dc7f644c86090a9ac518e44fb1.tar.xz mana-c1b7d619971ea3dc7f644c86090a9ac518e44fb1.zip |
Fixing switch login
Switch login gets you stuck at the ConnectionDialog. That
happens because logout is not implemented.
TODO: Implementing proper logout.
This resolves http://bugs.manasource.org/view.php?id=225
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/client.cpp b/src/client.cpp index f1b363e9..9bf761a0 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -532,12 +532,7 @@ int Client::exec() Net::getLoginHandler()->disconnect(); } else if (mState == STATE_CONNECT_SERVER && - mOldState == STATE_CHOOSE_SERVER) - { - Net::connectToServer(mCurrentServer); - } - else if (mState == STATE_CONNECT_SERVER && - mOldState != STATE_CHOOSE_SERVER && + mOldState == STATE_CONNECT_SERVER && Net::getLoginHandler()->isConnected()) { mState = STATE_LOGIN; @@ -632,6 +627,9 @@ int Client::exec() case STATE_CONNECT_SERVER: logger->log("State: CONNECT SERVER"); + + Net::connectToServer(mCurrentServer); + mCurrentDialog = new ConnectionDialog( _("Connecting to server"), STATE_SWITCH_SERVER); break; @@ -924,9 +922,9 @@ int Client::exec() case STATE_SWITCH_LOGIN: logger->log("State: SWITCH LOGIN"); - Net::getLoginHandler()->logout(); + Net::getLoginHandler()->disconnect(); - mState = STATE_LOGIN; + mState = STATE_CONNECT_SERVER; break; case STATE_SWITCH_CHARACTER: |