mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-07 04:47:45 +00:00
feat(Core/Battleground): Config to allow/disallow ability to Share Quest & Ready Check (#2924)
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user