返回提交历史
Modified
src/services/missionInventoryUpdateService.ts
+10
-2
Modified
src/types/requestTypes.ts
+1
-0
XFEstudio/SpaceNinjaServer
fix: spy mission rewards (#370)
b4fedb7f
代码差异
2 个文件
+11
-2
@@ -28,8 +28,16 @@ const getRewards = ({
28
28
return { InventoryChanges: {}, MissionRewards: [] };
29
29
}
30
30
31
const rotationCount = RewardInfo.rewardQualifications?.length || 0;
32
const rotations = getRotations(rotationCount);
31
let rotations: number[] = [];
32
if (RewardInfo.VaultsCracked) {
33
// For Spy missions, e.g. 3 vaults cracked = A, B, C
34
for (let i = 0; i != RewardInfo.VaultsCracked; ++i) {
35
rotations.push(i);
36
}
37
} else {
38
const rotationCount = RewardInfo.rewardQualifications?.length || 0;
39
rotations = getRotations(rotationCount);
40
}
33
41
const drops: IReward[] = [];
34
42
rewardManifests
35
43
.map(name => ExportRewards[name])
@@ -63,6 +63,7 @@ export interface IMissionInventoryUpdateRequest {
63
63
64
64
export interface IMissionInventoryUpdateRequestRewardInfo {
65
65
node: string;
66
VaultsCracked?: number; // for Spy missions
66
67
rewardTier?: number;
67
68
nightmareMode?: boolean;
68
69
useVaultManifest?: boolean;