fix: always multiply acquired gear quantity by purchaseQuantity
All checks were successful
Build / build (push) Successful in 1m35s
Build / build (pull_request) Successful in 45s

This commit is contained in:
Sainan 2025-04-29 21:27:48 +02:00
parent 9468768947
commit ea595173fb
2 changed files with 6 additions and 2 deletions

View File

@ -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
);

View File

@ -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,