返回提交历史
Modified
src/controllers/api/syndicateSacrificeController.ts
+11
-2
XFEstudio/SpaceNinjaServer
fix: don't assume syndicate sacrifices are MiscItems (#3078)
e.g. EntratiSyndicate requires Keratinos blueprints Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/3078 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
f2ad7990
代码差异
1 个文件
+11
-2
@@ -4,7 +4,13 @@ import { getAccountIdForRequest } from "../../services/loginService.ts";
4
4
import type { ISyndicateSacrifice } from "warframe-public-export-plus";
5
5
import { ExportSyndicates } from "warframe-public-export-plus";
6
6
import { handleStoreItemAcquisition } from "../../services/purchaseService.ts";
7
import { addMiscItem, combineInventoryChanges, getInventory, updateCurrency } from "../../services/inventoryService.ts";
7
import {
8
addItem,
9
addMiscItem,
10
combineInventoryChanges,
11
getInventory,
12
updateCurrency
13
} from "../../services/inventoryService.ts";
8
14
import type { IInventoryChanges } from "../../types/purchaseTypes.ts";
9
15
import { toStoreItem } from "../../services/itemDataService.ts";
10
16
import { logger } from "../../utils/logger.ts";
@@ -57,7 +63,10 @@ export const syndicateSacrificeController: RequestHandler = async (request, resp
57
63
updateCurrency(inventory, sacrifice.credits, false, res.InventoryChanges);
58
64
59
65
for (const item of sacrifice.items) {
60
addMiscItem(inventory, item.ItemType, item.ItemCount * -1, res.InventoryChanges);
66
combineInventoryChanges(
67
res.InventoryChanges,
68
await addItem(inventory, item.ItemType, item.ItemCount * -1)
69
);
61
70
}
62
71
}
63
72