From d5e8513e085b6fc8da2ea4bb7151ac8e98be74c8 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sat, 24 Mar 2007 01:57:39 +0000 Subject: Go back to login or register state on error, depending on what the user was doing, and fixed the error message when registering an account that already exists. Also another crash fix following from previous commit. --- src/net/charserverhandler.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/net/charserverhandler.cpp') diff --git a/src/net/charserverhandler.cpp b/src/net/charserverhandler.cpp index 01a8756b..a54a17de 100644 --- a/src/net/charserverhandler.cpp +++ b/src/net/charserverhandler.cpp @@ -134,6 +134,7 @@ void CharServerHandler::handleMessage(MessageIn *msg) case 0x0071: player_node = mCharInfo->getEntry(); + slot = mCharInfo->getPos(); msg->skip(4); // CharID, must be the same as player_node->charID map_path = msg->readString(16); mLoginData->hostname = iptostring(msg->readInt32()); @@ -145,10 +146,14 @@ void CharServerHandler::handleMessage(MessageIn *msg) { LocalPlayer *tmp = mCharInfo->getEntry(); if (tmp != player_node) + { delete tmp; + mCharInfo->setEntry(0); + } mCharInfo->next(); } while (mCharInfo->getPos()); + mCharInfo->select(slot); state = CONNECTING_STATE; break; -- cgit v1.2.3-60-g2f50