forked from OpenWF/SpaceNinjaServer
		
	don't even try for rewards if score is not a new PB
This commit is contained in:
		
							parent
							
								
									837d481633
								
							
						
					
					
						commit
						38112dcdf4
					
				@ -789,20 +789,19 @@ export const addMissionRewards = async (
 | 
			
		||||
                inventory.EchoesHexConquestCacheScoreMission = score;
 | 
			
		||||
        } else {
 | 
			
		||||
            inventory.EntratiLabConquestCacheScoreMission ??= 0;
 | 
			
		||||
 | 
			
		||||
            for (const reward of labConquestRewards) {
 | 
			
		||||
                if (score >= reward.at && inventory.EntratiLabConquestCacheScoreMission < reward.at) {
 | 
			
		||||
                    const rolled = getRandomReward(reward.pool)!;
 | 
			
		||||
                    logger.debug(`rolled lab conquest reward for reaching ${reward.at} points`, rolled);
 | 
			
		||||
                    MissionRewards.push({
 | 
			
		||||
                        StoreItem: rolled.type,
 | 
			
		||||
                        ItemCount: rolled.itemCount
 | 
			
		||||
                    });
 | 
			
		||||
            if (score > inventory.EntratiLabConquestCacheScoreMission) {
 | 
			
		||||
                for (const reward of labConquestRewards) {
 | 
			
		||||
                    if (score >= reward.at && inventory.EntratiLabConquestCacheScoreMission < reward.at) {
 | 
			
		||||
                        const rolled = getRandomReward(reward.pool)!;
 | 
			
		||||
                        logger.debug(`rolled lab conquest reward for reaching ${reward.at} points`, rolled);
 | 
			
		||||
                        MissionRewards.push({
 | 
			
		||||
                            StoreItem: rolled.type,
 | 
			
		||||
                            ItemCount: rolled.itemCount
 | 
			
		||||
                        });
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (score > inventory.EntratiLabConquestCacheScoreMission)
 | 
			
		||||
                inventory.EntratiLabConquestCacheScoreMission = score;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        ConquestCompletedMissionsCount = rewardInfo.ConquestCompleted == 2 ? 0 : rewardInfo.ConquestCompleted + 1;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user