*Fix Spell 1852 (This is a GM tool for silencing players.)
--HG-- branch : trunk
This commit is contained in:
@@ -735,6 +735,7 @@ INSERT INTO `trinity_string` (`entry`, `content_default`, `content_loc1`, `conte
|
||||
(6613, '|cfff00000[GM Announcement]: %s|r', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
|
||||
(6614, 'Notification to GM''s - ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
|
||||
(6615, '|cffffff00[|c1f40af20GM Announce by|r |cffff0000%s|cffffff00]:|r %s|r', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
|
||||
(6616, 'Silence is ON for %s', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
|
||||
(7523, 'WORLD: Denying connections.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
|
||||
(7524, 'WORLD: Accepting connections.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
|
||||
(10001, 'The Horde has taken The Overlook!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
INSERT INTO `trinity_string` (`entry`,`content_default`) VALUES ('6616','Silence is ON for %s');
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user