From 159e151dc06df9ff6ea434d429baaa0ddfa6b7b2 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Mon, 6 Oct 2025 22:56:04 -0700 Subject: [PATCH] chore: check for xpBasedLevelCapDisabled in missionInventoryUpdate (#2859) The bootstrapper provides this field since 0.8.2, so I think this field being absent is now more likely to mean that the patch is not in effect. Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2859 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com> --- .../api/missionInventoryUpdateController.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/controllers/api/missionInventoryUpdateController.ts b/src/controllers/api/missionInventoryUpdateController.ts index 3633e02a7..eb912e401 100644 --- a/src/controllers/api/missionInventoryUpdateController.ts +++ b/src/controllers/api/missionInventoryUpdateController.ts @@ -129,14 +129,22 @@ export const missionInventoryUpdateController: RequestHandler = async (req, res) res.json(deltas); } else if (missionReport.RewardInfo) { logger.debug(`classic mission completion, sending everything`); - const inventoryResponse = await getInventoryResponse(inventory, true, account.BuildLabel); + const inventoryResponse = await getInventoryResponse( + inventory, + "xpBasedLevelCapDisabled" in req.query, + account.BuildLabel + ); res.json({ InventoryJson: JSON.stringify(inventoryResponse), ...deltas } satisfies IMissionInventoryUpdateResponse); } else { logger.debug(`no reward info, assuming this wasn't a mission completion and we should just sync inventory`); - const inventoryResponse = await getInventoryResponse(inventory, true, account.BuildLabel); + const inventoryResponse = await getInventoryResponse( + inventory, + "xpBasedLevelCapDisabled" in req.query, + account.BuildLabel + ); res.json({ InventoryJson: JSON.stringify(inventoryResponse) } satisfies IMissionInventoryUpdateResponseBackToDryDock);