From 2f6e704c07b73d6be4c6f2e2b885882aaf0be167 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Wed, 20 Oct 2021 10:26:23 +0200 Subject: [PATCH] feat(Core/CLI): Flash WorldServer at start (Windows only) (#8477) --- src/server/worldserver/CommandLine/CliRunnable.cpp | 13 +++++++++++++ src/server/worldserver/worldserver.conf.dist | 8 ++++++++ 2 files changed, 21 insertions(+) diff --git a/src/server/worldserver/CommandLine/CliRunnable.cpp b/src/server/worldserver/CommandLine/CliRunnable.cpp index 4b295870c..598b964b3 100644 --- a/src/server/worldserver/CommandLine/CliRunnable.cpp +++ b/src/server/worldserver/CommandLine/CliRunnable.cpp @@ -147,6 +147,19 @@ void CliThread() if (sConfigMgr->GetOption("BeepAtStart", true)) printf("\a"); // \a = Alert +#if AC_PLATFORM == AC_PLATFORM_WINDOWS + if (sConfigMgr->GetOption("FlashAtStart", true)) + { + FLASHWINFO fInfo; + fInfo.cbSize = sizeof(FLASHWINFO); + fInfo.dwFlags = FLASHW_TRAY | FLASHW_TIMERNOFG; + fInfo.hwnd = GetConsoleWindow(); + fInfo.uCount = 0; + fInfo.dwTimeout = 0; + FlashWindowEx(&fInfo); + } +#endif + // print this here the first time // later it will be printed after command queue updates PrintCliPrefix(); diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist index 063079f6d..801bdcd1d 100644 --- a/src/server/worldserver/worldserver.conf.dist +++ b/src/server/worldserver/worldserver.conf.dist @@ -1186,6 +1186,14 @@ Event.Announce = 0 BeepAtStart = 1 +# +# FlashAtStart +# Description: Flashes in taskbar when the world server finished starting. (Works on Windows only) +# Default: 1 - (Enabled) +# 0 - (Disabled) + +FlashAtStart = 1 + # # Motd # Description: Message of the Day, displayed at login.