mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Propagate realm-reported build to world handshake for vanilla compatibility
Some checks failed
Build / Build (arm64) (push) Has been cancelled
Build / Build (x86-64) (push) Has been cancelled
Build / Build (macOS arm64) (push) Has been cancelled
Build / Build (windows-arm64) (push) Has been cancelled
Build / Build (windows-x86-64) (push) Has been cancelled
Security / CodeQL (C/C++) (push) Has been cancelled
Security / Semgrep (push) Has been cancelled
Security / Sanitizer Build (ASan/UBSan) (push) Has been cancelled
Some checks failed
Build / Build (arm64) (push) Has been cancelled
Build / Build (x86-64) (push) Has been cancelled
Build / Build (macOS arm64) (push) Has been cancelled
Build / Build (windows-arm64) (push) Has been cancelled
Build / Build (windows-x86-64) (push) Has been cancelled
Security / CodeQL (C/C++) (push) Has been cancelled
Security / Semgrep (push) Has been cancelled
Security / Sanitizer Build (ASan/UBSan) (push) Has been cancelled
- Prefer realm.build over profile worldBuild when non-zero in CMSG_AUTH_SESSION - Fixes vanilla (1.12.1 build 5875) servers rejecting connection due to wrong build - Suppress v0.0.0 display in realm list when version info is all zeros
This commit is contained in:
parent
16d88f19fc
commit
0e1241ca60
2 changed files with 12 additions and 4 deletions
|
|
@ -1349,16 +1349,18 @@ void Application::setupUICallbacks() {
|
|||
}
|
||||
|
||||
uint32_t realmId = 0;
|
||||
uint16_t realmBuild = 0;
|
||||
{
|
||||
// WotLK AUTH_SESSION includes a RealmID field; some servers reject if it's wrong/zero.
|
||||
const auto& realms = authHandler->getRealms();
|
||||
for (const auto& r : realms) {
|
||||
if (r.name == realmName && r.address == realmAddress) {
|
||||
realmId = r.id;
|
||||
realmBuild = r.build;
|
||||
break;
|
||||
}
|
||||
}
|
||||
LOG_INFO("Selected realmId=", realmId);
|
||||
LOG_INFO("Selected realmId=", realmId, " realmBuild=", realmBuild);
|
||||
}
|
||||
|
||||
uint32_t clientBuild = 12340; // default WotLK
|
||||
|
|
@ -1366,6 +1368,12 @@ void Application::setupUICallbacks() {
|
|||
auto* profile = expansionRegistry_->getActive();
|
||||
if (profile) clientBuild = profile->worldBuild;
|
||||
}
|
||||
// Prefer realm-reported build when available (e.g. vanilla servers
|
||||
// that report build 5875 in the realm list)
|
||||
if (realmBuild != 0) {
|
||||
clientBuild = realmBuild;
|
||||
LOG_INFO("Using realm-reported build: ", clientBuild);
|
||||
}
|
||||
if (gameHandler->connect(host, port, sessionKey, accountName, clientBuild, realmId)) {
|
||||
LOG_INFO("Connected to world server, transitioning to character selection");
|
||||
setState(AppState::CHARACTER_SELECTION);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue