*Fix Spell 1852 (This is a GM tool for silencing players.)

--HG--
branch : trunk
This commit is contained in:
Nevan
2009-08-01 12:06:06 +02:00
parent 452eb46398
commit 03604a2567
5 changed files with 23 additions and 0 deletions

View File

@@ -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;