fix: omit nightwave challenges for versions before 38.0.8 (#1969)
Some checks failed
Build / build (push) Has been cancelled
Build Docker image / docker (push) Has been cancelled

Reviewed-on: #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:
Sainan 2025-05-03 17:24:31 -07:00 committed by Sainan
parent f7b4b4f089
commit 18fbd51efb

View File

@ -762,6 +762,8 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
}
// Nightwave Challenges
// 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.
if (!buildLabel || version_compare(buildLabel, "2025.02.05.11.19") >= 0) {
worldState.SeasonInfo.ActiveChallenges.push(getSeasonDailyChallenge(day - 2));
worldState.SeasonInfo.ActiveChallenges.push(getSeasonDailyChallenge(day - 1));
worldState.SeasonInfo.ActiveChallenges.push(getSeasonDailyChallenge(day - 0));
@ -772,6 +774,7 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
if (isBeforeNextExpectedWorldStateRefresh(weekEnd)) {
pushWeeklyActs(worldState, week + 1);
}
}
// Elite Sanctuary Onslaught cycling every week
worldState.NodeOverrides.find(x => x.Node == "SolNode802")!.Seed = new CRng(week).randomInt(0, 0xffff);