Fix current char being removed from the char_taken list too early

This commit is contained in:
MangosArentLiterature 2021-04-08 14:02:59 -05:00
parent 5f405c20bc
commit 43d73f7b91

View File

@ -138,10 +138,6 @@ void AOClient::changeCharacter(int char_id)
{
AreaData* area = server->areas[current_area];
if (current_char != "") {
area->characters_taken.removeAll(server->getCharID(current_char));
}
if(char_id >= server->characters.length())
return;
@ -151,6 +147,10 @@ void AOClient::changeCharacter(int char_id)
if (taken || char_selected == "")
return;
if (current_char != "") {
area->characters_taken.removeAll(server->getCharID(current_char));
}
area->characters_taken.append(char_id);
current_char = char_selected;
}