mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Fix auth protocol to match real WoW 3.3.5a client format
Three critical bugs fixed: - LOGON_CHALLENGE request: set protocol byte to 0x03 (was 0x00) and reverse FourCC strings (game/platform/os/locale) to match real client - Response parsers: remove double-read of opcode byte that shifted all field reads by one, preventing successful auth with real servers - LOGON_PROOF response sizes: success=32 bytes, failure=4 bytes to match TrinityCore/AzerothCore format Also adds missing auth result codes (0x13-0x20, 0xFF) including IGR_WITHOUT_BNET (0x17) which Warmane was returning.
This commit is contained in:
parent
1b414d24d8
commit
5ef11fdc7d
4 changed files with 53 additions and 52 deletions
|
|
@ -224,14 +224,14 @@ size_t TCPSocket::getExpectedPacketSize(uint8_t opcode) {
|
|||
return 0; // Need more data to determine
|
||||
|
||||
case 0x01: // LOGON_PROOF response
|
||||
// opcode(1) + status(1) + M2(20) = 22 bytes on success
|
||||
// opcode(1) + status(1) = 2 bytes on failure
|
||||
// Success: opcode(1) + status(1) + M2(20) + accountFlags(4) + surveyId(4) + loginFlags(2) = 32
|
||||
// Failure: opcode(1) + status(1) + padding(2) = 4
|
||||
if (receiveBuffer.size() >= 2) {
|
||||
uint8_t status = receiveBuffer[1];
|
||||
if (status == 0x00) {
|
||||
return 22; // Success
|
||||
return 32; // Success
|
||||
} else {
|
||||
return 2; // Failure
|
||||
return 4; // Failure
|
||||
}
|
||||
}
|
||||
return 0; // Need more data
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue