fix: respect purchaseQuantity when giving gear items from inbox message
All checks were successful
Build / build (20) (push) Successful in 34s
Build / build (18) (push) Successful in 1m3s
Build / build (20) (pull_request) Successful in 1m1s
Build / build (22) (pull_request) Successful in 56s
Build / build (22) (push) Successful in 1m0s
Build / build (18) (pull_request) Successful in 34s
All checks were successful
Build / build (20) (push) Successful in 34s
Build / build (18) (push) Successful in 1m3s
Build / build (20) (pull_request) Successful in 1m1s
Build / build (22) (pull_request) Successful in 56s
Build / build (22) (push) Successful in 1m0s
Build / build (18) (pull_request) Successful in 34s
This commit is contained in:
parent
0e7c124d26
commit
befebf8e38
@ -10,6 +10,7 @@ import {
|
|||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { addItems, getInventory } from "@/src/services/inventoryService";
|
import { addItems, getInventory } from "@/src/services/inventoryService";
|
||||||
import { logger } from "@/src/utils/logger";
|
import { logger } from "@/src/utils/logger";
|
||||||
|
import { ExportGear } from "warframe-public-export-plus";
|
||||||
|
|
||||||
export const inboxController: RequestHandler = async (req, res) => {
|
export const inboxController: RequestHandler = async (req, res) => {
|
||||||
const { deleteId, lastMessage: latestClientMessageId, messageId } = req.query;
|
const { deleteId, lastMessage: latestClientMessageId, messageId } = req.query;
|
||||||
@ -43,7 +44,10 @@ export const inboxController: RequestHandler = async (req, res) => {
|
|||||||
if (attachmentItems) {
|
if (attachmentItems) {
|
||||||
await addItems(
|
await addItems(
|
||||||
inventory,
|
inventory,
|
||||||
attachmentItems.map(attItem => ({ ItemType: attItem, ItemCount: 1 })),
|
attachmentItems.map(attItem => ({
|
||||||
|
ItemType: attItem,
|
||||||
|
ItemCount: attItem in ExportGear ? (ExportGear[attItem].purchaseQuantity ?? 1) : 1
|
||||||
|
})),
|
||||||
inventoryChanges
|
inventoryChanges
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user