Core/Chat: Added option to allow 5-man parties to use raid warnings

Closes #17889

* Added parentheses to satisfy TravisCI.

* Adjusted to a boolean config option instead of an integer.

(cherry-picked from fc06465b17)
This commit is contained in:
Alan Deutscher
2017-01-07 04:03:03 -08:00
committed by Shauren
parent ea0cd93662
commit 77150bc8ec
4 changed files with 13 additions and 1 deletions

View File

@@ -360,7 +360,7 @@ void WorldSession::HandleChatMessage(ChatMsg type, uint32 lang, std::string msg,
case CHAT_MSG_RAID_WARNING:
{
Group* group = GetPlayer()->GetGroup();
if (!group || !group->isRaidGroup() || !(group->IsLeader(GetPlayer()->GetGUID()) || group->IsAssistant(GetPlayer()->GetGUID())) || group->isBGGroup())
if (!group || (group->isRaidGroup() && !(group->IsLeader(GetPlayer()->GetGUID()) || group->IsAssistant(GetPlayer()->GetGUID()))) || group->isBGGroup() || !sWorld->getBoolConfig(CONFIG_CHAT_PARTY_RAID_WARNINGS))
return;
sScriptMgr->OnPlayerChat(GetPlayer(), type, lang, msg, group);