Mark old cle entries as stale when you login

This commit is contained in:
KimLS
2019-07-20 22:12:48 -07:00
parent 186834594f
commit 780f8f8515
3 changed files with 18 additions and 1 deletions
+5 -1
View File
@@ -109,11 +109,15 @@ void LoginServer::ProcessUsertoWorldReq(uint16_t opcode, EQ::Net::Packet &p) {
auto cle = client_list.FindCLEByLSID(utwr->lsaccountid);
if (cle != nullptr) {
auto status = cle->GetOnline();
if (CLE_Status_Never != status && CLE_Status_Offline != status) {
if (CLE_Status_Zoning == status || CLE_Status_InZone == status) {
utwrs->response = UserToWorldStatusAlreadyOnline;
SendPacket(&outpack);
return;
}
else {
//our existing cle is in a state we can login to, mark the old as stale and remove it.
client_list.RemoveCLEByLSID(utwr->lsaccountid);
}
}
}