aboutsummaryrefslogtreecommitdiff
path: root/src/charselect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/charselect.cpp')
-rw-r--r--src/charselect.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/charselect.cpp b/src/charselect.cpp
index 2443393..5097814 100644
--- a/src/charselect.cpp
+++ b/src/charselect.cpp
@@ -201,7 +201,13 @@ void Courtroom::char_clicked(int n_char)
if (n_char != m_cid || n_char == -1)
{
ao_app->send_server_packet(AOPacket("PW", {ui_char_password->text()}));
- ao_app->send_server_packet(AOPacket("CC", {QString::number(ao_app->client_id), QString::number(n_char), get_hdid()}));
+ // The first field is unused; upstream sends the client ID for some reason.
+ // The second field is the actual character ID.
+ // The third field is HDID, which is absolutely ridiculous to send here.
+ // Because of ossification of AO protocol, three fields are required.
+ // Tsuserver annoyingly enforces that the first field is an integer, and the
+ // last field is a string. Hardcode dumb "0" in both places and move on.
+ ao_app->send_server_packet(AOPacket("CC", {"0", QString::number(n_char), "0"}));
}
if (n_char == m_cid || n_char == -1)
{