返回提交历史
Modified
src/controllers/api/inboxController.ts
+5
-1
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
代码差异
1 个文件
+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
}