refactor(Core/Chat): Move SendWorldText(optional) to ChatHandler and … (#19501)

* refactor(Core/Chat): Move SendWorldText(optional) to ChatHandler and allow `fmt`

* Update src/server/game/Battlegrounds/BattlegroundQueue.cpp

* Update src/server/game/Battlegrounds/BattlegroundQueue.cpp

* Update src/server/game/Misc/BanMgr.cpp

* Update src/server/game/Misc/BanMgr.cpp

* Update src/server/game/Misc/BanMgr.cpp

* Update src/server/game/Misc/BanMgr.cpp

* Update src/server/game/Misc/BanMgr.cpp

* Update src/server/game/Misc/BanMgr.cpp

* Update src/server/game/Misc/BanMgr.cpp

* Update src/server/game/Misc/BanMgr.cpp
This commit is contained in:
Kitzunu
2024-07-29 19:44:13 +02:00
committed by GitHub
parent d5c472b25d
commit 87f4adf634
18 changed files with 119 additions and 94 deletions

View File

@@ -17,6 +17,7 @@
#include "GameEventMgr.h"
#include "BattlegroundMgr.h"
#include "Chat.h"
#include "DisableMgr.h"
#include "GameObjectAI.h"
#include "GameTime.h"
@@ -1230,7 +1231,7 @@ void GameEventMgr::ApplyNewEvent(uint16 event_id)
{
uint8 announce = mGameEvent[event_id].announce;
if (announce == 1 || (announce == 2 && sWorld->getIntConfig(CONFIG_EVENT_ANNOUNCE)))
sWorld->SendWorldText(LANG_EVENTMESSAGE, mGameEvent[event_id].description.c_str());
ChatHandler(nullptr).SendWorldText(LANG_EVENTMESSAGE, mGameEvent[event_id].description);
LOG_DEBUG("gameevent", "GameEvent {} \"{}\" started.", event_id, mGameEvent[event_id].description);