From cdf7f51ea1d39c6e256857d404cbbb40ee918100 Mon Sep 17 00:00:00 2001 From: Rin Date: Sun, 17 Jul 2022 15:01:48 +0100 Subject: [PATCH] add notices --- src/config.ts | 1 + src/modules/game.ts | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/config.ts b/src/config.ts index fd9821f..43293e3 100644 --- a/src/config.ts +++ b/src/config.ts @@ -7,6 +7,7 @@ export interface ConfigFile { serverIp?: string; gameOptions: GameOptions; unix?: UnixOptions; + notices?: string[]; } export interface UnixOptions { diff --git a/src/modules/game.ts b/src/modules/game.ts index ce6a674..b12c66b 100644 --- a/src/modules/game.ts +++ b/src/modules/game.ts @@ -288,10 +288,12 @@ export default class GameModule extends Module { category: x.category } }); + let notice = (Config.getConfig().notices || []); + let noticeWindows = notice.map(a => wm.wm.protobuf.NoticeEntry.NOTICE_UNUSED_1); let msg = { error: wm.wm.protobuf.ErrorCode.ERR_SUCCESS, - noticeWindow: [], - noticeWindowMessage: [], + noticeWindow: noticeWindows, + noticeWindowMessage: notice, transferNotice: { needToSeeTransferred: false, totalMaxiGold: 0,