返回提交历史
Modified
src/services/worldStateService.ts
+12
-9
XFEstudio/XFESpaceNinjaServer
fix: omit nightwave challenges for versions before 38.0.8 (#1969)
Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/1969 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
18fbd51e
代码差异
1 个文件
+12
-9
@@ -762,15 +762,18 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
762
762
}
763
763
764
764
// Nightwave Challenges
765
worldState.SeasonInfo.ActiveChallenges.push(getSeasonDailyChallenge(day - 2));
766
worldState.SeasonInfo.ActiveChallenges.push(getSeasonDailyChallenge(day - 1));
767
worldState.SeasonInfo.ActiveChallenges.push(getSeasonDailyChallenge(day - 0));
768
if (isBeforeNextExpectedWorldStateRefresh(EPOCH + (day + 1) * 86400000)) {
769
worldState.SeasonInfo.ActiveChallenges.push(getSeasonDailyChallenge(day + 1));
770
}
771
pushWeeklyActs(worldState, week);
772
if (isBeforeNextExpectedWorldStateRefresh(weekEnd)) {
773
pushWeeklyActs(worldState, week + 1);
765
// 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.
766
if (!buildLabel || version_compare(buildLabel, "2025.02.05.11.19") >= 0) {
767
worldState.SeasonInfo.ActiveChallenges.push(getSeasonDailyChallenge(day - 2));
768
worldState.SeasonInfo.ActiveChallenges.push(getSeasonDailyChallenge(day - 1));
769
worldState.SeasonInfo.ActiveChallenges.push(getSeasonDailyChallenge(day - 0));
770
if (isBeforeNextExpectedWorldStateRefresh(EPOCH + (day + 1) * 86400000)) {
771
worldState.SeasonInfo.ActiveChallenges.push(getSeasonDailyChallenge(day + 1));
772
}
773
pushWeeklyActs(worldState, week);
774
if (isBeforeNextExpectedWorldStateRefresh(weekEnd)) {
775
pushWeeklyActs(worldState, week + 1);
776
}
774
777
}
775
778
776
779
// Elite Sanctuary Onslaught cycling every week