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".
This commit is contained in:
Kelsi 2026-03-09 16:39:52 -07:00
parent f0d1702d5f
commit c57182627f

View file

@ -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: