1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-24 05:17:46 +00:00

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.
This commit is contained in:
Joshua Goins 2022-07-20 17:58:21 -04:00
parent c74e1bb459
commit c5253f408b

View file

@ -171,8 +171,14 @@ void SquareLauncher::registerSession(const LoginInformation& info) {
QString report = info.settings->bootVersion + "=" + getBootHash(info); QString report = info.settings->bootVersion + "=" + getBootHash(info);
for(int i = 1; i < info.settings->installedMaxExpansion; i++) for(int i = 1; i < auth.maxExpansion + 1; i++) {
report += QString("\nex%1\t%2").arg(QString::number(i), info.settings->gameVersions[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()); auto reply = window.mgr->post(request, report.toUtf8());
connect(reply, &QNetworkReply::finished, [&] { connect(reply, &QNetworkReply::finished, [&] {