返回提交历史
Modified
src/controllers/api/inboxController.ts
+11
-0
Modified
src/models/loginModel.ts
+2
-1
Modified
src/services/configService.ts
+4
-0
Modified
src/types/loginTypes.ts
+1
-0
XFEstudio/SpaceNinjaServer
fix: missing Long Shadow event start inbox message (#3242)
Closes #3029 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/3242 Reviewed-by: Sainan <63328889+sainan@users.noreply.github.com> Co-authored-by: Animan8000 <187183497+Veniman8000@users.noreply.github.com> Co-committed-by: Animan8000 <187183497+Veniman8000@users.noreply.github.com>
318c14be
代码差异
4 个文件
+18
-1
@@ -262,6 +262,17 @@ const createNewEventMessages = async (account: TAccountDocument): Promise<void>
262
262
goalTag: "GalleonRobbery"
263
263
});
264
264
}
265
if (config.worldState?.longShadow && !account.receivedEventMessage_longShadow) {
266
account.receivedEventMessage_longShadow = true;
267
newEventMessages.push({
268
sndr: "/Lotus/Language/Menu/Mailbox_WarframeSender",
269
sub: "/Lotus/Language/G1Quests/ProjectNightwatchTacAlertCommunityMsgTitle",
270
msg: "/Lotus/Language/G1Quests/ProjectNightwatchTacAlertCommunityMsgDesc",
271
icon: "/Lotus/Interface/Icons/Npcs/Lotus_d.png",
272
startDate: new Date(),
273
goalTag: "NightwatchTacAlert"
274
});
275
}
265
276
266
277
if (newEventMessages.length === 0) {
267
278
return;
@@ -34,7 +34,8 @@ const databaseAccountSchema = new Schema<IDatabaseAccountJson>(
34
34
receivedEventMessage_creditBoost: Boolean,
35
35
receivedEventMessage_affinityBoost: Boolean,
36
36
receivedEventMessage_resourceBoost: Boolean,
37
receivedEventMessage_galleonOfGhouls: Boolean
37
receivedEventMessage_galleonOfGhouls: Boolean,
38
receivedEventMessage_longShadow: Boolean
38
39
},
39
40
opts
40
41
);
@@ -217,6 +217,10 @@ export const syncConfigWithDatabase = (): void => {
217
217
void Account.updateMany({}, { $unset: { receivedEventMessage_galleonOfGhouls: 1 } }).then(() => {});
218
218
void Inbox.deleteMany({ goalTag: "GalleonRobbery" }).then(() => {});
219
219
}
220
if (!config.worldState?.longShadow) {
221
void Account.updateMany({}, { $unset: { receivedEventMessage_longShadow: 1 } }).then(() => {});
222
void Inbox.deleteMany({ goalTag: "NightwatchTacAlert" }).then(() => {});
223
}
220
224
};
221
225
222
226
export const getReflexiveAddress = (request: Request): { myAddress: string; myUrlBase: string } => {
@@ -31,6 +31,7 @@ export interface IDatabaseAccount extends IDatabaseAccountRequiredFields {
31
31
receivedEventMessage_affinityBoost?: boolean;
32
32
receivedEventMessage_resourceBoost?: boolean;
33
33
receivedEventMessage_galleonOfGhouls?: boolean;
34
receivedEventMessage_longShadow?: boolean;
34
35
}
35
36
36
37
// Includes virtual ID