feat(Core/CLI): Flash WorldServer at start (Windows only) (#8477)

This commit is contained in:
Kitzunu
2021-10-20 10:26:23 +02:00
committed by GitHub
parent 283ffb20e8
commit 2f6e704c07
2 changed files with 21 additions and 0 deletions

View File

@@ -147,6 +147,19 @@ void CliThread()
if (sConfigMgr->GetOption<bool>("BeepAtStart", true))
printf("\a"); // \a = Alert
#if AC_PLATFORM == AC_PLATFORM_WINDOWS
if (sConfigMgr->GetOption<bool>("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();

View File

@@ -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.