From a4986b95ca83da990456e6c6506aa35e49186938 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Mon, 6 Oct 2025 20:49:41 +0200 Subject: [PATCH] chore(webui): sync account cheats between different webui tabs --- src/controllers/custom/setAccountCheatController.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/controllers/custom/setAccountCheatController.ts b/src/controllers/custom/setAccountCheatController.ts index 586cebb6..efd7f6c8 100644 --- a/src/controllers/custom/setAccountCheatController.ts +++ b/src/controllers/custom/setAccountCheatController.ts @@ -1,6 +1,6 @@ import { getInventory } from "../../services/inventoryService.ts"; import { getAccountIdForRequest } from "../../services/loginService.ts"; -import { sendWsBroadcastTo } from "../../services/wsService.ts"; +import { sendWsBroadcastEx, sendWsBroadcastTo } from "../../services/wsService.ts"; import type { IAccountCheats } from "../../types/inventoryTypes/inventoryTypes.ts"; import type { RequestHandler } from "express"; import { logger } from "../../utils/logger.ts"; @@ -20,6 +20,8 @@ export const setAccountCheatController: RequestHandler = async (req, res) => { res.end(); if (["infiniteCredits", "infinitePlatinum", "infiniteEndo", "infiniteRegalAya"].indexOf(payload.key) != -1) { sendWsBroadcastTo(accountId, { update_inventory: true, sync_inventory: true }); + } else { + sendWsBroadcastEx({ update_inventory: true }, accountId, parseInt(String(req.query.wsid))); } };