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

@@ -55,7 +55,7 @@ void WorldSession::HandleBattlemasterHelloOpcode(WorldPacket& recvData)
if (!_player->GetBGAccessByLevel(bgTypeId))
{
// temp, must be gossip message...
SendNotification(LANG_YOUR_BG_LEVEL_REQ_ERROR);
ChatHandler(this).SendNotification(LANG_YOUR_BG_LEVEL_REQ_ERROR);
return;
}
@@ -414,7 +414,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket& recvData)
if (_player->GetCharmGUID() || _player->IsInCombat())
{
_player->GetSession()->SendNotification(LANG_YOU_IN_COMBAT);
ChatHandler(_player->GetSession()).SendNotification(LANG_YOU_IN_COMBAT);
return;
}