From d5ef936bf2d8976a32d01b4e32024c89333ca645 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Tue, 3 Nov 2009 15:03:23 -0700 Subject: Fix switching characters under ManaServ --- src/net/manaserv/gamehandler.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'src/net/manaserv/gamehandler.cpp') 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) -- cgit v1.2.3-70-g09d2