mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-25 00:20:16 +00:00
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:
parent
f0d1702d5f
commit
c57182627f
1 changed files with 14 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue