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: respect purchaseQuantity when giving gear items from inbox message (#960)

Closes #942 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/960 Co-authored-by: Sainan <sainan@calamity.inc> Co-committed-by: Sainan <sainan@calamity.inc>

cd100c87
Sainan <sainan@calamity.inc>
提交于

代码差异

1 个文件 +5 -1
Modified src/controllers/api/inboxController.ts +5 -1
@@ -10,6 +10,7 @@ import {
10 10 import { getAccountIdForRequest } from "@/src/services/loginService";
11 11 import { addItems, getInventory } from "@/src/services/inventoryService";
12 12 import { logger } from "@/src/utils/logger";
13 import { ExportGear } from "warframe-public-export-plus";
13 14
14 15 export const inboxController: RequestHandler = async (req, res) => {
15 16 const { deleteId, lastMessage: latestClientMessageId, messageId } = req.query;
@@ -43,7 +44,10 @@ export const inboxController: RequestHandler = async (req, res) => {
43 44 if (attachmentItems) {
44 45 await addItems(
45 46 inventory,
46 attachmentItems.map(attItem => ({ ItemType: attItem, ItemCount: 1 })),
47 attachmentItems.map(attItem => ({
48 ItemType: attItem,
49 ItemCount: attItem in ExportGear ? (ExportGear[attItem].purchaseQuantity ?? 1) : 1
50 })),
47 51 inventoryChanges
48 52 );
49 53 }