fix: handle droptable giving a 3-day booster
All checks were successful
Build / build (22) (push) Successful in 39s
Build / build (20) (push) Successful in 1m1s
Build / build (18) (push) Successful in 1m4s
Build / build (18) (pull_request) Successful in 40s
Build / build (20) (pull_request) Successful in 1m2s
Build / build (22) (pull_request) Successful in 1m4s

e.g. sorties can rarely give these
This commit is contained in:
Sainan 2025-02-23 05:45:01 +01:00
parent 0142aa72a8
commit dcc6c9dfbf

View File

@ -11,7 +11,6 @@ import {
addFocusXpIncreases, addFocusXpIncreases,
addFusionTreasures, addFusionTreasures,
addGearExpByCategory, addGearExpByCategory,
addItem,
addMiscItems, addMiscItems,
addMissionComplete, addMissionComplete,
addMods, addMods,
@ -28,6 +27,7 @@ import { getEntriesUnsafe } from "@/src/utils/ts-utils";
import { IEquipmentClient } from "@/src/types/inventoryTypes/commonInventoryTypes"; import { IEquipmentClient } from "@/src/types/inventoryTypes/commonInventoryTypes";
import junctionRewards from "@/static/fixed_responses/junctionRewards.json"; import junctionRewards from "@/static/fixed_responses/junctionRewards.json";
import { IJunctionRewards } from "@/src/types/commonTypes"; import { IJunctionRewards } from "@/src/types/commonTypes";
import { handleStoreItemAcquisition } from "./purchaseService";
const getRotations = (rotationCount: number): number[] => { const getRotations = (rotationCount: number): number[] => {
if (rotationCount === 0) return [0]; if (rotationCount === 0) return [0];
@ -290,8 +290,7 @@ export const addMissionRewards = async (
} }
for (const reward of MissionRewards) { for (const reward of MissionRewards) {
//TODO: additem should take in storeItems const inventoryChange = await handleStoreItemAcquisition(reward.StoreItem, inventory, reward.ItemCount);
const inventoryChange = await addItem(inventory, reward.StoreItem.replace("StoreItems/", ""), reward.ItemCount);
//TODO: combineInventoryChanges improve type safety, merging 2 of the same item? //TODO: combineInventoryChanges improve type safety, merging 2 of the same item?
//TODO: check for the case when two of the same item are added, combineInventoryChanges should merge them, but the client also merges them //TODO: check for the case when two of the same item are added, combineInventoryChanges should merge them, but the client also merges them
//TODO: some conditional types to rule out binchanges? //TODO: some conditional types to rule out binchanges?