fix: omit nightwave challenges for versions before 38.0.8 (#1969)
Reviewed-on: OpenWF/SpaceNinjaServer#1969 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									f7b4b4f089
								
							
						
					
					
						commit
						18fbd51efb
					
				@ -762,15 +762,18 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Nightwave Challenges
 | 
					    // Nightwave Challenges
 | 
				
			||||||
    worldState.SeasonInfo.ActiveChallenges.push(getSeasonDailyChallenge(day - 2));
 | 
					    // Current nightwave season was introduced in 38.0.8 so omitting challenges before that to avoid UI bugs and even crashes on really old versions.
 | 
				
			||||||
    worldState.SeasonInfo.ActiveChallenges.push(getSeasonDailyChallenge(day - 1));
 | 
					    if (!buildLabel || version_compare(buildLabel, "2025.02.05.11.19") >= 0) {
 | 
				
			||||||
    worldState.SeasonInfo.ActiveChallenges.push(getSeasonDailyChallenge(day - 0));
 | 
					        worldState.SeasonInfo.ActiveChallenges.push(getSeasonDailyChallenge(day - 2));
 | 
				
			||||||
    if (isBeforeNextExpectedWorldStateRefresh(EPOCH + (day + 1) * 86400000)) {
 | 
					        worldState.SeasonInfo.ActiveChallenges.push(getSeasonDailyChallenge(day - 1));
 | 
				
			||||||
        worldState.SeasonInfo.ActiveChallenges.push(getSeasonDailyChallenge(day + 1));
 | 
					        worldState.SeasonInfo.ActiveChallenges.push(getSeasonDailyChallenge(day - 0));
 | 
				
			||||||
    }
 | 
					        if (isBeforeNextExpectedWorldStateRefresh(EPOCH + (day + 1) * 86400000)) {
 | 
				
			||||||
    pushWeeklyActs(worldState, week);
 | 
					            worldState.SeasonInfo.ActiveChallenges.push(getSeasonDailyChallenge(day + 1));
 | 
				
			||||||
    if (isBeforeNextExpectedWorldStateRefresh(weekEnd)) {
 | 
					        }
 | 
				
			||||||
        pushWeeklyActs(worldState, week + 1);
 | 
					        pushWeeklyActs(worldState, week);
 | 
				
			||||||
 | 
					        if (isBeforeNextExpectedWorldStateRefresh(weekEnd)) {
 | 
				
			||||||
 | 
					            pushWeeklyActs(worldState, week + 1);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Elite Sanctuary Onslaught cycling every week
 | 
					    // Elite Sanctuary Onslaught cycling every week
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user