From c5253f408baadd430c3aa026984afd465c06f958 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Wed, 20 Jul 2022 17:58:21 -0400 Subject: [PATCH] Report missing expansion versions to the server if needed This matches behavior in the official retail launcher, if Astra detects a mismatch between installed expansions and the expansions reported by your service account, Astra will now report them as missing and in need of patching. --- launcher/core/src/squarelauncher.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/launcher/core/src/squarelauncher.cpp b/launcher/core/src/squarelauncher.cpp index ce0e64b..78bbfd6 100644 --- a/launcher/core/src/squarelauncher.cpp +++ b/launcher/core/src/squarelauncher.cpp @@ -171,8 +171,14 @@ void SquareLauncher::registerSession(const LoginInformation& info) { QString report = info.settings->bootVersion + "=" + getBootHash(info); - for(int i = 1; i < info.settings->installedMaxExpansion; i++) - report += QString("\nex%1\t%2").arg(QString::number(i), info.settings->gameVersions[i]); + for(int i = 1; i < auth.maxExpansion + 1; i++) { + if(i <= info.settings->installedMaxExpansion) { + report += QString("\nex%1\t%2") + .arg(QString::number(i), info.settings->gameVersions[i]); + } else { + report += QString("\nex%1\t2012.01.01.0000.0000").arg(QString::number(i)); + } + } auto reply = window.mgr->post(request, report.toUtf8()); connect(reply, &QNetworkReply::finished, [&] {