diff --git a/src/aoclient.cpp b/src/aoclient.cpp index c06da28..6dbf76d 100644 --- a/src/aoclient.cpp +++ b/src/aoclient.cpp @@ -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; }