Fix current char being removed from the char_taken list too early
This commit is contained in:
parent
5f405c20bc
commit
43d73f7b91
@ -138,10 +138,6 @@ void AOClient::changeCharacter(int char_id)
|
|||||||
{
|
{
|
||||||
AreaData* area = server->areas[current_area];
|
AreaData* area = server->areas[current_area];
|
||||||
|
|
||||||
if (current_char != "") {
|
|
||||||
area->characters_taken.removeAll(server->getCharID(current_char));
|
|
||||||
}
|
|
||||||
|
|
||||||
if(char_id >= server->characters.length())
|
if(char_id >= server->characters.length())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -151,6 +147,10 @@ void AOClient::changeCharacter(int char_id)
|
|||||||
if (taken || char_selected == "")
|
if (taken || char_selected == "")
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (current_char != "") {
|
||||||
|
area->characters_taken.removeAll(server->getCharID(current_char));
|
||||||
|
}
|
||||||
|
|
||||||
area->characters_taken.append(char_id);
|
area->characters_taken.append(char_id);
|
||||||
current_char = char_selected;
|
current_char = char_selected;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user