Files
WoWee/include/auth/auth_opcodes.hpp
Kelsi 5ef11fdc7d 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.
2026-02-05 12:39:34 -08:00

53 lines
1.1 KiB
C++

#pragma once
#include <cstdint>
namespace wowee {
namespace auth {
// Authentication server opcodes
enum class AuthOpcode : uint8_t {
LOGON_CHALLENGE = 0x00,
LOGON_PROOF = 0x01,
RECONNECT_CHALLENGE = 0x02,
RECONNECT_PROOF = 0x03,
REALM_LIST = 0x10,
};
// LOGON_CHALLENGE response status codes
enum class AuthResult : uint8_t {
SUCCESS = 0x00,
UNKNOWN0 = 0x01,
UNKNOWN1 = 0x02,
ACCOUNT_BANNED = 0x03,
ACCOUNT_INVALID = 0x04,
PASSWORD_INVALID = 0x05,
ALREADY_ONLINE = 0x06,
OUT_OF_CREDIT = 0x07,
BUSY = 0x08,
BUILD_INVALID = 0x09,
BUILD_UPDATE = 0x0A,
INVALID_SERVER = 0x0B,
ACCOUNT_SUSPENDED = 0x0C,
ACCESS_DENIED = 0x0D,
SURVEY = 0x0E,
PARENTAL_CONTROL = 0x0F,
LOCK_ENFORCED = 0x10,
TRIAL_EXPIRED = 0x11,
BATTLE_NET = 0x12,
ANTI_INDULGENCE = 0x13,
EXPIRED = 0x14,
NO_GAME_ACCOUNT = 0x15,
CHARGEBACK = 0x16,
IGR_WITHOUT_BNET = 0x17,
GAME_ACCOUNT_LOCKED = 0x18,
UNLOCKABLE_LOCK = 0x19,
CONVERSION_REQUIRED = 0x20,
DISCONNECTED = 0xFF,
};
const char* getAuthResultString(AuthResult result);
} // namespace auth
} // namespace wowee