feat(Core/Battleground): Config to allow/disallow ability to Share Quest & Ready Check (#2924)

This commit is contained in:
Kitzunu
2020-05-22 16:54:17 +02:00
committed by GitHub
parent 92442cfb2f
commit 55dc9afc73
7 changed files with 54 additions and 1 deletions

View File

@@ -20,6 +20,7 @@
#include "Util.h"
#include "SpellAuras.h"
#include "Vehicle.h"
#include "Language.h"
class Aura;
@@ -742,6 +743,17 @@ void WorldSession::HandleRaidReadyCheckOpcode(WorldPacket& recvData)
return;
/********************/
// Check if Ready Check in BG is enabled
if (sWorld->getBoolConfig(CONFIG_BATTLEGROUND_DISABLE_READY_CHECK_IN_BG))
{
// Check if player is in BG
if (_player->InBattleground())
{
_player->GetSession()->SendNotification(LANG_BG_READY_CHECK_ERROR);
return;
}
}
// everything's fine, do it
WorldPacket data(MSG_RAID_READY_CHECK, 8);
data << GetPlayer()->GetGUID();