diff --git a/src/controllers/api/inboxController.ts b/src/controllers/api/inboxController.ts index 7adc2d3d..7462de3e 100644 --- a/src/controllers/api/inboxController.ts +++ b/src/controllers/api/inboxController.ts @@ -11,7 +11,7 @@ import { import { getAccountForRequest, getAccountFromSuffixedName, getSuffixedName } from "@/src/services/loginService"; import { addItems, combineInventoryChanges, getInventory } from "@/src/services/inventoryService"; import { logger } from "@/src/utils/logger"; -import { ExportFlavour, ExportGear } from "warframe-public-export-plus"; +import { ExportFlavour } from "warframe-public-export-plus"; import { handleStoreItemAcquisition } from "@/src/services/purchaseService"; import { fromStoreItem, isStoreItem } from "@/src/services/itemDataService"; @@ -50,7 +50,7 @@ export const inboxController: RequestHandler = async (req, res) => { inventory, attachmentItems.map(attItem => ({ ItemType: isStoreItem(attItem) ? fromStoreItem(attItem) : attItem, - ItemCount: attItem in ExportGear ? (ExportGear[attItem].purchaseQuantity ?? 1) : 1 + ItemCount: 1 })), inventoryChanges ); diff --git a/src/services/inventoryService.ts b/src/services/inventoryService.ts index c3d47ec6..007cd177 100644 --- a/src/services/inventoryService.ts +++ b/src/services/inventoryService.ts @@ -486,6 +486,10 @@ export const addItem = async ( }; } if (typeName in ExportGear) { + // Multipling by purchase quantity for gear because: + // - The Saya's Vigil scanner message has it as a non-counted attachment. + // - Blueprints for Ancient Protector Specter, Shield Osprey Specter, etc. have num=1 despite giving their purchaseQuantity. + quantity *= ExportGear[typeName].purchaseQuantity ?? 1; const consumablesChanges = [ { ItemType: typeName,