feat/conf: toggle sending reload message to players

* Add conf

* Add stuff
This commit is contained in:
Benjamin Jackson
2022-10-27 12:28:07 -04:00
committed by GitHub
parent 363cb55588
commit bfd3bda8b9
2 changed files with 10 additions and 1 deletions

View File

@@ -19,10 +19,16 @@
# The path can be relative or absolute.
# Default: "lua_scripts"
#
# Eluna.PlayerAnnounceReload
# Description: Enable or disable whether the reload announcement is sent to players (Lowest security level).
# Default: false - (disabled)
# true - (enabled)
#
Eluna.Enabled = true
Eluna.TraceBack = false
Eluna.ScriptPath = "lua_scripts"
Eluna.PlayerAnnounceReload = false
###################################################################################################

View File

@@ -133,7 +133,10 @@ void Eluna::_ReloadEluna()
LOCK_ELUNA;
ASSERT(IsInitialized());
eWorld->SendServerMessage(SERVER_MSG_STRING, "Reloading Eluna...");
if (eConfigMgr->GetOption<bool>("Eluna.PlayerAnnounceReload", false))
eWorld->SendServerMessage(SERVER_MSG_STRING, "Reloading Eluna...");
else
eWorld->SendGMText(SERVER_MSG_STRING, "Reloading Eluna...");
// Remove all timed events
sEluna->eventMgr->SetStates(LUAEVENT_STATE_ERASE);