返回提交历史
Modified
src/services/missionInventoryUpdateService.ts
+2
-3
XFEstudio/XFESpaceNinjaServer
fix: handle droptable giving a 3-day booster (#993)
e.g. sorties can rarely give these Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/993 Co-authored-by: Sainan <sainan@calamity.inc> Co-committed-by: Sainan <sainan@calamity.inc>
84d7b5a6
代码差异
1 个文件
+2
-3
@@ -11,7 +11,6 @@ import {
11
11
addFocusXpIncreases,
12
12
addFusionTreasures,
13
13
addGearExpByCategory,
14
addItem,
15
14
addMiscItems,
16
15
addMissionComplete,
17
16
addMods,
@@ -28,6 +27,7 @@ import { getEntriesUnsafe } from "@/src/utils/ts-utils";
28
27
import { IEquipmentClient } from "@/src/types/inventoryTypes/commonInventoryTypes";
29
28
import junctionRewards from "@/static/fixed_responses/junctionRewards.json";
30
29
import { IJunctionRewards } from "@/src/types/commonTypes";
30
import { handleStoreItemAcquisition } from "./purchaseService";
31
31
32
32
const getRotations = (rotationCount: number): number[] => {
33
33
if (rotationCount === 0) return [0];
@@ -287,8 +287,7 @@ export const addMissionRewards = async (
287
287
}
288
288
289
289
for (const reward of MissionRewards) {
290
//TODO: additem should take in storeItems
291
const inventoryChange = await addItem(inventory, reward.StoreItem.replace("StoreItems/", ""), reward.ItemCount);
290
const inventoryChange = await handleStoreItemAcquisition(reward.StoreItem, inventory, reward.ItemCount);
292
291
//TODO: combineInventoryChanges improve type safety, merging 2 of the same item?
293
292
//TODO: check for the case when two of the same item are added, combineInventoryChanges should merge them, but the client also merges them
294
293
//TODO: some conditional types to rule out binchanges?