handle KeyToRemove in EOM upload

This commit is contained in:
Sainan 2025-04-06 16:05:44 +02:00
parent bbadca908c
commit d0f6650c41
2 changed files with 14 additions and 0 deletions

View File

@ -22,6 +22,7 @@ import {
addFusionTreasures,
addGearExpByCategory,
addItem,
addLevelKeys,
addMiscItems,
addMissionComplete,
addMods,
@ -89,6 +90,16 @@ export const addMissionInventoryUpdates = async (
]);
}
}
if (inventoryUpdates.KeyToRemove) {
if (!inventoryUpdates.KeyOwner || inventory.accountOwnerId.equals(inventoryUpdates.KeyOwner)) {
addLevelKeys(inventory, [
{
ItemType: inventoryUpdates.KeyToRemove,
ItemCount: -1
}
]);
}
}
if (
inventoryUpdates.MissionFailed &&
inventoryUpdates.MissionStatus == "GS_FAILURE" &&

View File

@ -49,6 +49,9 @@ export type IMissionInventoryUpdateRequest = {
rewardsMultiplier?: number;
GoalTag: string;
LevelKeyName: string;
KeyOwner?: string;
KeyRemovalHash?: string;
KeyToRemove?: string;
ActiveBoosters?: IBooster[];
RawUpgrades?: IRawUpgrade[];
FusionTreasures?: IFusionTreasure[];