diff options
author | Nevan <none@none> | 2009-08-01 12:06:06 +0200 |
---|---|---|
committer | Nevan <none@none> | 2009-08-01 12:06:06 +0200 |
commit | 03604a25670b9dbbe91537d1af21f2b5a06bbe07 (patch) | |
tree | dd96aa88737102ec0888dfd6700aa71c35490944 /src | |
parent | 452eb463988cd6f4c39ed9682606995d95826702 (diff) |
*Fix Spell 1852 (This is a GM tool for silencing players.)
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/ChatHandler.cpp | 18 | ||||
-rw-r--r-- | src/game/Language.h | 2 | ||||
-rw-r--r-- | src/game/SpellMgr.cpp | 1 |
3 files changed, 21 insertions, 0 deletions
diff --git a/src/game/ChatHandler.cpp b/src/game/ChatHandler.cpp index ae9da2d9fe5..0b38c3aaa0a 100644 --- a/src/game/ChatHandler.cpp +++ b/src/game/ChatHandler.cpp @@ -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; diff --git a/src/game/Language.h b/src/game/Language.h index 215c160b5bc..20fae7a7166 100644 --- a/src/game/Language.h +++ b/src/game/Language.h @@ -870,6 +870,8 @@ enum TrinityStrings LANG_GM_NOTIFY = 6614, LANG_GM_ANNOUNCE_COLOR = 6615, + LANG_GM_SILENCE = 6616, // "Silence is ON for %s" - Spell 1852 + LANG_WORLD_CLOSED = 7523, LANG_WORLD_OPENED = 7524, diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index a4a7b03ba6e..4ffd1263149 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -710,6 +710,7 @@ bool IsPositiveEffect(uint32 spellId, uint32 effIndex, bool deep) switch(spellId) { + case 1852: // Silenced (GM) case 46392: // Focused Assault case 46393: // Brutal Assault case 28441: // not positive dummy spell |