fix: spy mission rewards (#370)

This commit is contained in:
Sainan 2024-06-22 23:19:42 +02:00 committed by GitHub
parent 8e8c77a3d5
commit b4fedb7fff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 2 deletions

View File

@ -28,8 +28,16 @@ const getRewards = ({
return { InventoryChanges: {}, MissionRewards: [] };
}
const rotationCount = RewardInfo.rewardQualifications?.length || 0;
const rotations = getRotations(rotationCount);
let rotations: number[] = [];
if (RewardInfo.VaultsCracked) {
// For Spy missions, e.g. 3 vaults cracked = A, B, C
for (let i = 0; i != RewardInfo.VaultsCracked; ++i) {
rotations.push(i);
}
} else {
const rotationCount = RewardInfo.rewardQualifications?.length || 0;
rotations = getRotations(rotationCount);
}
const drops: IReward[] = [];
rewardManifests
.map(name => ExportRewards[name])

View File

@ -63,6 +63,7 @@ export interface IMissionInventoryUpdateRequest {
export interface IMissionInventoryUpdateRequestRewardInfo {
node: string;
VaultsCracked?: number; // for Spy missions
rewardTier?: number;
nightmareMode?: boolean;
useVaultManifest?: boolean;