fix unlock all focus schools for when logged in on an old version
All checks were successful
Build / build (pull_request) Successful in 1m42s

This commit is contained in:
Sainan 2025-10-14 19:15:33 +02:00
parent bfce46cf83
commit 978ecf6b1e
2 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ import { version_compare } from "../../helpers/inventoryHelpers.ts";
export const focusController: RequestHandler = async (req, res) => {
const account = await getAccountForRequest(req);
let op: string | undefined;
let op = req.query.op as string;
const focus2 = account.BuildLabel && version_compare(account.BuildLabel, "2022.04.29.12.53") < 0;
if (focus2) {
// Focus 2.0

View File

@ -3276,13 +3276,13 @@ function unlockFocusSchool(upgradeType) {
return new Promise(resolve => {
// Deselect current FocusAbility so we will be able to unlock the way for free
$.post({
url: "/api/focus.php?" + window.authz + "&op=5",
url: "/api/focus.php?" + window.authz + "&op=ActivateWay",
contentType: "text/plain",
data: JSON.stringify({ FocusType: null })
}).done(function () {
// Unlock the way now
$.post({
url: "/api/focus.php?" + window.authz + "&op=2",
url: "/api/focus.php?" + window.authz + "&op=UnlockWay",
contentType: "text/plain",
data: JSON.stringify({
FocusType: upgradeType