From c57182627fd94ad0c0a769bab2a8630c750080cc Mon Sep 17 00:00:00 2001 From: Kelsi Date: Mon, 9 Mar 2026 16:39:52 -0700 Subject: [PATCH] Respond to SMSG_REALM_SPLIT with CMSG_REALM_SPLIT ack Previously the packet was silently consumed. Some servers send SMSG_REALM_SPLIT during login and expect a CMSG_REALM_SPLIT acknowledgement, otherwise they may time out the session. Responds with splitType echoed back and patchVersion "3.3.5". --- src/game/game_handler.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index dca53220..62621f2a 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -4505,9 +4505,22 @@ void GameHandler::handlePacket(network::Packet& packet) { } // ---- Realm split ---- - case Opcode::SMSG_REALM_SPLIT: + case Opcode::SMSG_REALM_SPLIT: { + // uint32 splitType + uint32 deferTime + string realmName + // Client must respond with CMSG_REALM_SPLIT to avoid session timeout on some servers. + uint32_t splitType = 0; + if (packet.getSize() - packet.getReadPos() >= 4) + splitType = packet.readUInt32(); packet.setReadPos(packet.getSize()); + if (socket) { + network::Packet resp(wireOpcode(Opcode::CMSG_REALM_SPLIT)); + resp.writeUInt32(splitType); + resp.writeString("3.3.5"); + socket->send(resp); + LOG_DEBUG("SMSG_REALM_SPLIT splitType=", splitType, " — sent CMSG_REALM_SPLIT ack"); + } break; + } // ---- Real group update (status flags) ---- case Opcode::SMSG_REAL_GROUP_UPDATE: