refactor(Core/Chat): Move SendNotification to ChatHander (#19491)

* refactor(Core/Chat): Move SendNotification to ChatHander

* Update Battleground.cpp

* fix build

* Update src/server/game/Chat/Chat.h
This commit is contained in:
Kitzunu
2024-08-10 16:39:46 +02:00
committed by GitHub
parent ebc6218275
commit e4df159f5c
21 changed files with 96 additions and 75 deletions

View File

@@ -16,6 +16,7 @@
*/
#include "BattlegroundMgr.h"
#include "Chat.h"
#include "GossipDef.h"
#include "Language.h"
#include "ObjectMgr.h"
@@ -262,9 +263,9 @@ void Player::OnGossipSelect(WorldObject* source, uint32 gossipListId, uint32 men
ToggleInstantFlight();
if (m_isInstantFlightOn)
GetSession()->SendNotification(LANG_INSTANT_FLIGHT_ON);
ChatHandler(GetSession()).SendNotification(LANG_INSTANT_FLIGHT_ON);
else
GetSession()->SendNotification(LANG_INSTANT_FLIGHT_OFF);
ChatHandler(GetSession()).SendNotification(LANG_INSTANT_FLIGHT_OFF);
PlayerTalkClass->SendCloseGossip();
return;