diff options
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/charserverhandler.cpp | 5 | ||||
-rw-r--r-- | src/net/loginhandler.cpp | 5 |
2 files changed, 8 insertions, 2 deletions
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; diff --git a/src/net/loginhandler.cpp b/src/net/loginhandler.cpp index 195e54e9..ab788e41 100644 --- a/src/net/loginhandler.cpp +++ b/src/net/loginhandler.cpp @@ -53,7 +53,8 @@ void LoginHandler::handleMessage(MessageIn *msg) msg->skip(2); n_server = (msg->getLength() - 47) / 32; - server_info = (SERVER_INFO**)malloc(sizeof(SERVER_INFO*) * n_server); + server_info = + (SERVER_INFO**) malloc(sizeof(SERVER_INFO*) * n_server); mLoginData->session_ID1 = msg->readInt32(); mLoginData->account_ID = msg->readInt32(); @@ -103,7 +104,7 @@ void LoginHandler::handleMessage(MessageIn *msg) errorMessage = "You have been banned for 5 minutes"; break; case 9: - errorMessage = "This account is already logged in"; + errorMessage = "This user name is already taken"; break; default: errorMessage = "Unknown error"; |