diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-11-03 15:03:23 -0700 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-11-03 15:03:23 -0700 |
commit | d5ef936bf2d8976a32d01b4e32024c89333ca645 (patch) | |
tree | 3093ae1b7611b8dbad2aba02cba12b9e2da31e36 /src/net/manaserv/gamehandler.cpp | |
parent | c416c51531e37e0be457e47b7c0e52439c543341 (diff) | |
download | mana-d5ef936bf2d8976a32d01b4e32024c89333ca645.tar.gz mana-d5ef936bf2d8976a32d01b4e32024c89333ca645.tar.bz2 mana-d5ef936bf2d8976a32d01b4e32024c89333ca645.tar.xz mana-d5ef936bf2d8976a32d01b4e32024c89333ca645.zip |
Fix switching characters under ManaServ
Diffstat (limited to 'src/net/manaserv/gamehandler.cpp')
-rw-r--r-- | src/net/manaserv/gamehandler.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/net/manaserv/gamehandler.cpp b/src/net/manaserv/gamehandler.cpp index 306dc5e6..c2d20233 100644 --- a/src/net/manaserv/gamehandler.cpp +++ b/src/net/manaserv/gamehandler.cpp @@ -58,7 +58,16 @@ void GameHandler::handleMessage(Net::MessageIn &msg) // Successful logout if (errMsg == ERRMSG_OK) { - // TODO: Handle logout + netToken = msg.readString(32); +\ + if (!netToken.empty()) + { + state = STATE_SWITCH_CHARACTER; + } + else + { + // TODO: Handle logout + } } // Logout failed else @@ -115,11 +124,11 @@ void GameHandler::who() // TODO } -void GameHandler::quit() +void GameHandler::quit(bool reconnectAccount) { - //MessageOut msg(PGMSG_DISCONNECT); - //msg.writeInt8((unsigned char) reconnectAccount); - //gameServerConnection->send(msg); + MessageOut msg(PGMSG_DISCONNECT); + msg.writeInt8((unsigned char) reconnectAccount); + gameServerConnection->send(msg); } void GameHandler::ping(int tick) |