From abc3bd86246ce4dd9cb8927f280e87a72c77b0b8 Mon Sep 17 00:00:00 2001 From: Sainan Date: Fri, 18 Oct 2024 16:49:33 +0200 Subject: [PATCH] fix: being unable to visit Palladino in Iron Wake despite completeAllQuests (#564) --- src/controllers/api/inventoryController.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/controllers/api/inventoryController.ts b/src/controllers/api/inventoryController.ts index 8ff1411ad..315af1cc1 100644 --- a/src/controllers/api/inventoryController.ts +++ b/src/controllers/api/inventoryController.ts @@ -70,15 +70,22 @@ const inventoryController: RequestHandler = async (request, response) => { } if (config.completeAllQuests) { for (const quest of inventoryResponse.QuestKeys) { + quest.unlock = true; quest.Completed = true; - quest.Progress = [ - { + + let numStages = 1; + if (quest.ItemType in ExportKeys && "chainStages" in ExportKeys[quest.ItemType]) { + numStages = ExportKeys[quest.ItemType].chainStages!.length; + } + quest.Progress = []; + for (let i = 0; i != numStages; ++i) { + quest.Progress.push({ c: 0, i: false, m: false, b: [] - } - ]; + }); + } } inventoryResponse.ArchwingEnabled = true;