From 23f8818257e0f90466af36c30ea8fb4e85017999 Mon Sep 17 00:00:00 2001 From: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Date: Sat, 22 Feb 2025 10:04:51 +0100 Subject: [PATCH] fix: LevelKeys items added to QuestKeys --- package-lock.json | 8 +++---- package.json | 2 +- src/services/inventoryService.ts | 36 ++++++++++++++++++++++---------- 3 files changed, 30 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index ec52be41..32e6bbf4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "copyfiles": "^2.4.1", "express": "^5", "mongoose": "^8.9.4", - "warframe-public-export-plus": "^0.5.30", + "warframe-public-export-plus": "^0.5.34", "warframe-riven-info": "^0.1.2", "winston": "^3.17.0", "winston-daily-rotate-file": "^5.0.0" @@ -4093,9 +4093,9 @@ } }, "node_modules/warframe-public-export-plus": { - "version": "0.5.30", - "resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.30.tgz", - "integrity": "sha512-vzs+naEqp3iFZTbgIky4jiNbjNIovuR4oSimrFiuyIbrnfTlfXFzDfzT0hG2rgS8yEXBAbOcv2Zfm3fmWuZ0Kg==" + "version": "0.5.34", + "resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.34.tgz", + "integrity": "sha512-sv6un4KohFEEJUbnmiWqf+KL4Th8r8HLI/owsutwni4R9g154JWEBScX7+6K7jH8eXWYxeKuCtPU9a5X2JFGHQ==" }, "node_modules/warframe-riven-info": { "version": "0.1.2", diff --git a/package.json b/package.json index d26bee37..650cdb29 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "copyfiles": "^2.4.1", "express": "^5", "mongoose": "^8.9.4", - "warframe-public-export-plus": "^0.5.30", + "warframe-public-export-plus": "^0.5.34", "warframe-riven-info": "^0.1.2", "winston": "^3.17.0", "winston-daily-rotate-file": "^5.0.0" diff --git a/src/services/inventoryService.ts b/src/services/inventoryService.ts index c43e1d1c..ef62851a 100644 --- a/src/services/inventoryService.ts +++ b/src/services/inventoryService.ts @@ -367,17 +367,31 @@ export const addItem = async ( }; } if (typeName in ExportKeys) { - // Note: "/Lotus/Types/Keys/" contains some EmailItems - inventory.QuestKeys.push({ ItemType: typeName }); - return { - InventoryChanges: { - QuestKeys: [ - { - ItemType: typeName - } - ] - } - }; + if (ExportKeys[typeName].chainStages) { + inventory.QuestKeys.push({ ItemType: typeName, Progress: [] }); + return { + InventoryChanges: { + QuestKeys: [ + { + ItemType: typeName, + Progress: [] + } + ] + } + }; + } else { + inventory.LevelKeys.push({ ItemType: typeName, ItemCount: quantity }); + return { + InventoryChanges: { + LevelKeys: [ + { + ItemType: typeName, + ItemCount: quantity + } + ] + } + }; + } } // Path-based duck typing