mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 10:55:43 +00:00
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:
@@ -1118,7 +1118,7 @@ void WorldSession::HandleWorldTeleportOpcode(WorldPacket& recv_data)
|
||||
if (AccountMgr::IsAdminAccount(GetSecurity()))
|
||||
GetPlayer()->TeleportTo(mapid, PositionX, PositionY, PositionZ, Orientation);
|
||||
else
|
||||
SendNotification(LANG_PERMISSION_DENIED);
|
||||
ChatHandler(this).SendNotification(LANG_PERMISSION_DENIED);
|
||||
}
|
||||
|
||||
void WorldSession::HandleWhoisOpcode(WorldPacket& recv_data)
|
||||
@@ -1129,13 +1129,13 @@ void WorldSession::HandleWhoisOpcode(WorldPacket& recv_data)
|
||||
|
||||
if (!AccountMgr::IsAdminAccount(GetSecurity()))
|
||||
{
|
||||
SendNotification(LANG_PERMISSION_DENIED);
|
||||
ChatHandler(this).SendNotification(LANG_PERMISSION_DENIED);
|
||||
return;
|
||||
}
|
||||
|
||||
if (charname.empty() || !normalizePlayerName (charname))
|
||||
{
|
||||
SendNotification(LANG_NEED_CHARACTER_NAME);
|
||||
ChatHandler(this).SendNotification(LANG_NEED_CHARACTER_NAME);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1143,7 +1143,7 @@ void WorldSession::HandleWhoisOpcode(WorldPacket& recv_data)
|
||||
|
||||
if (!player)
|
||||
{
|
||||
SendNotification(LANG_PLAYER_NOT_EXIST_OR_OFFLINE, charname.c_str());
|
||||
ChatHandler(this).SendNotification(LANG_PLAYER_NOT_EXIST_OR_OFFLINE, charname.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1157,7 +1157,7 @@ void WorldSession::HandleWhoisOpcode(WorldPacket& recv_data)
|
||||
|
||||
if (!result)
|
||||
{
|
||||
SendNotification(LANG_ACCOUNT_FOR_PLAYER_NOT_FOUND, charname.c_str());
|
||||
ChatHandler(this).SendNotification(LANG_ACCOUNT_FOR_PLAYER_NOT_FOUND, charname.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user