forked from OpenWF/SpaceNinjaServer
fix: spy mission rewards (#370)
This commit is contained in:
parent
8e8c77a3d5
commit
b4fedb7fff
@ -28,8 +28,16 @@ const getRewards = ({
|
||||
return { InventoryChanges: {}, MissionRewards: [] };
|
||||
}
|
||||
|
||||
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;
|
||||
const rotations = getRotations(rotationCount);
|
||||
rotations = getRotations(rotationCount);
|
||||
}
|
||||
const drops: IReward[] = [];
|
||||
rewardManifests
|
||||
.map(name => ExportRewards[name])
|
||||
|
@ -63,6 +63,7 @@ export interface IMissionInventoryUpdateRequest {
|
||||
|
||||
export interface IMissionInventoryUpdateRequestRewardInfo {
|
||||
node: string;
|
||||
VaultsCracked?: number; // for Spy missions
|
||||
rewardTier?: number;
|
||||
nightmareMode?: boolean;
|
||||
useVaultManifest?: boolean;
|
||||
|
Loading…
x
Reference in New Issue
Block a user