Send "CC" packet when selecting "Spectator" from the character selection screen (#511)

If n_char is -1, don't wait for a server response.
This commit is contained in:
in1tiate 2021-04-11 15:36:32 -05:00 committed by GitHub
parent 64acbd6ba0
commit 33cf6dea26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -168,14 +168,14 @@ void Courtroom::char_clicked(int n_char)
}
}
if (n_char != m_cid) {
if (n_char != m_cid || n_char == -1) {
ao_app->send_server_packet(
new AOPacket("PW#" + ui_char_password->text() + "#%"));
ao_app->send_server_packet(
new AOPacket("CC#" + QString::number(ao_app->s_pv) + "#" +
QString::number(n_char) + "#" + get_hdid() + "#%"));
}
else {
if (n_char == m_cid || n_char == -1) {
update_character(n_char);
enter_courtroom();
set_courtroom_size();