XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFESpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/XFESpaceNinjaServer

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
Animan8000 <187183497+Veniman8000@users.noreply.github.com>
提交于

代码差异

4 个文件 +18 -1
Modified src/controllers/api/inboxController.ts +11 -0
@@ -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;
Modified src/models/loginModel.ts +2 -1
@@ -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 );
Modified src/services/configService.ts +4 -0
@@ -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 } => {
Modified src/types/loginTypes.ts +1 -0
@@ -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