返回提交历史
Modified
src/services/worldStateService.ts
+6
-2
XFEstudio/XFESpaceNinjaServer
fix: don't provide syndicate missions in advance (#1979)
Closes #1975 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/1979 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
cfa3586f
代码差异
1 个文件
+6
-2
@@ -193,6 +193,12 @@ const pushSyndicateMissions = (
193
193
idSuffix: string,
194
194
syndicateTag: string
195
195
): void => {
196
const dayStart = getSortieTime(day);
197
if (Date.now() >= dayStart) {
198
return; // The client does not seem to respect activation.
199
}
200
const dayEnd = getSortieTime(day + 1);
201
196
202
const nodeOptions: string[] = [...syndicateMissions];
197
203
198
204
const rng = new CRng(seed);
@@ -203,8 +209,6 @@ const pushSyndicateMissions = (
203
209
nodeOptions.splice(index, 1);
204
210
}
205
211
206
const dayStart = getSortieTime(day);
207
const dayEnd = getSortieTime(day + 1);
208
212
worldState.SyndicateMissions.push({
209
213
_id: { $oid: ((dayStart / 1000) & 0xffffffff).toString(16).padStart(8, "0") + idSuffix },
210
214
Activation: { $date: { $numberLong: dayStart.toString() } },