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: [] };
 | 
					        return { InventoryChanges: {}, MissionRewards: [] };
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const rotationCount = RewardInfo.rewardQualifications?.length || 0;
 | 
					    let rotations: number[] = [];
 | 
				
			||||||
    const rotations = getRotations(rotationCount);
 | 
					    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[] = [];
 | 
					    const drops: IReward[] = [];
 | 
				
			||||||
    rewardManifests
 | 
					    rewardManifests
 | 
				
			||||||
        .map(name => ExportRewards[name])
 | 
					        .map(name => ExportRewards[name])
 | 
				
			||||||
 | 
				
			|||||||
@ -63,6 +63,7 @@ export interface IMissionInventoryUpdateRequest {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
export interface IMissionInventoryUpdateRequestRewardInfo {
 | 
					export interface IMissionInventoryUpdateRequestRewardInfo {
 | 
				
			||||||
    node: string;
 | 
					    node: string;
 | 
				
			||||||
 | 
					    VaultsCracked?: number; // for Spy missions
 | 
				
			||||||
    rewardTier?: number;
 | 
					    rewardTier?: number;
 | 
				
			||||||
    nightmareMode?: boolean;
 | 
					    nightmareMode?: boolean;
 | 
				
			||||||
    useVaultManifest?: boolean;
 | 
					    useVaultManifest?: boolean;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user