XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFESpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/XFESpaceNinjaServer

fix: always multiply acquired gear quantity by purchaseQuantity (#1924)

Closes #1915 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/1924 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>

c06abded
Sainan <63328889+Sainan@users.noreply.github.com>
提交于

代码差异

2 个文件 +6 -2
Modified src/controllers/api/inboxController.ts +2 -2
@@ -11,7 +11,7 @@ import {
11 11 import { getAccountForRequest, getAccountFromSuffixedName, getSuffixedName } from "@/src/services/loginService";
12 12 import { addItems, combineInventoryChanges, getInventory } from "@/src/services/inventoryService";
13 13 import { logger } from "@/src/utils/logger";
14 import { ExportFlavour, ExportGear } from "warframe-public-export-plus";
14 import { ExportFlavour } from "warframe-public-export-plus";
15 15 import { handleStoreItemAcquisition } from "@/src/services/purchaseService";
16 16 import { fromStoreItem, isStoreItem } from "@/src/services/itemDataService";
17 17
@@ -50,7 +50,7 @@ export const inboxController: RequestHandler = async (req, res) => {
50 50 inventory,
51 51 attachmentItems.map(attItem => ({
52 52 ItemType: isStoreItem(attItem) ? fromStoreItem(attItem) : attItem,
53 ItemCount: attItem in ExportGear ? (ExportGear[attItem].purchaseQuantity ?? 1) : 1
53 ItemCount: 1
54 54 })),
55 55 inventoryChanges
56 56 );
Modified src/services/inventoryService.ts +4 -0
@@ -486,6 +486,10 @@ export const addItem = async (
486 486 };
487 487 }
488 488 if (typeName in ExportGear) {
489 // Multipling by purchase quantity for gear because:
490 // - The Saya's Vigil scanner message has it as a non-counted attachment.
491 // - Blueprints for Ancient Protector Specter, Shield Osprey Specter, etc. have num=1 despite giving their purchaseQuantity.
492 quantity *= ExportGear[typeName].purchaseQuantity ?? 1;
489 493 const consumablesChanges = [
490 494 {
491 495 ItemType: typeName,