mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 18:36:31 +01:00
*Fix Spell 1852 (This is a GM tool for silencing players.)
--HG-- branch : trunk
This commit is contained in:
@@ -155,6 +155,18 @@ void WorldSession::HandleMessagechatOpcode( WorldPacket & recv_data )
|
||||
GetPlayer()->UpdateSpeakTime();
|
||||
}
|
||||
|
||||
if (GetPlayer()->HasAura(1852) && type != CHAT_MSG_WHISPER)
|
||||
{
|
||||
std::string msg="";
|
||||
recv_data >> msg;
|
||||
|
||||
if (ChatHandler(this).ParseCommands(msg.c_str()) == 0)
|
||||
{
|
||||
SendNotification(GetTrinityString(LANG_GM_SILENCE), GetPlayer()->GetName());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
switch(type)
|
||||
{
|
||||
case CHAT_MSG_SAY:
|
||||
@@ -231,6 +243,12 @@ void WorldSession::HandleMessagechatOpcode( WorldPacket & recv_data )
|
||||
}
|
||||
}
|
||||
|
||||
if (GetPlayer()->HasAura(1852) && !player->isGameMaster())
|
||||
{
|
||||
SendNotification(GetTrinityString(LANG_GM_SILENCE), GetPlayer()->GetName());
|
||||
return;
|
||||
}
|
||||
|
||||
GetPlayer()->Whisper(msg, lang,player->GetGUID());
|
||||
} break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user