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 "BattlegroundAV.h"
#include "ScriptMgr.h"
#include "GameObjectAI.h"
#include "Language.h"
#ifdef ELUNA
#include "LuaEngine.h"
#endif
@@ -586,6 +587,17 @@ void WorldSession::HandlePushQuestToParty(WorldPacket& recvPacket)
continue;
}
// Check if Quest Share in BG is enabled
if (sWorld->getBoolConfig(CONFIG_BATTLEGROUND_DISABLE_QUEST_SHARE_IN_BG))
{
// Check if player is in BG
if (_player->InBattleground())
{
_player->GetSession()->SendNotification(LANG_BG_SHARE_QUEST_ERROR);
continue;
}
}
if (player->GetDivider() != 0)
{
_player->SendPushToPartyResponse(player, QUEST_PARTY_MSG_BUSY);