feat(Core/Battleground): Config to allow/disallow ability to Share Quest & Ready Check (#2924)
This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1587562111390803800');
|
||||||
|
|
||||||
|
DELETE FROM `acore_string` WHERE entry IN (30083,30084);
|
||||||
|
INSERT INTO `acore_string` (`entry`, `content_default`) VALUES
|
||||||
|
(30083, 'You cannot share quests while in a Battleground.'),
|
||||||
|
(30084, 'You cannot start a Ready Check while in a Battlground.');
|
||||||
@@ -20,6 +20,7 @@
|
|||||||
#include "Util.h"
|
#include "Util.h"
|
||||||
#include "SpellAuras.h"
|
#include "SpellAuras.h"
|
||||||
#include "Vehicle.h"
|
#include "Vehicle.h"
|
||||||
|
#include "Language.h"
|
||||||
|
|
||||||
class Aura;
|
class Aura;
|
||||||
|
|
||||||
@@ -742,6 +743,17 @@ void WorldSession::HandleRaidReadyCheckOpcode(WorldPacket& recvData)
|
|||||||
return;
|
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
|
// everything's fine, do it
|
||||||
WorldPacket data(MSG_RAID_READY_CHECK, 8);
|
WorldPacket data(MSG_RAID_READY_CHECK, 8);
|
||||||
data << GetPlayer()->GetGUID();
|
data << GetPlayer()->GetGUID();
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
#include "BattlegroundAV.h"
|
#include "BattlegroundAV.h"
|
||||||
#include "ScriptMgr.h"
|
#include "ScriptMgr.h"
|
||||||
#include "GameObjectAI.h"
|
#include "GameObjectAI.h"
|
||||||
|
#include "Language.h"
|
||||||
#ifdef ELUNA
|
#ifdef ELUNA
|
||||||
#include "LuaEngine.h"
|
#include "LuaEngine.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -586,6 +587,17 @@ void WorldSession::HandlePushQuestToParty(WorldPacket& recvPacket)
|
|||||||
continue;
|
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)
|
if (player->GetDivider() != 0)
|
||||||
{
|
{
|
||||||
_player->SendPushToPartyResponse(player, QUEST_PARTY_MSG_BUSY);
|
_player->SendPushToPartyResponse(player, QUEST_PARTY_MSG_BUSY);
|
||||||
|
|||||||
@@ -1317,6 +1317,9 @@ enum AcoreStrings
|
|||||||
LANG_DEBUG_OPCODE_FILE_MISSING = 30080,
|
LANG_DEBUG_OPCODE_FILE_MISSING = 30080,
|
||||||
|
|
||||||
LANG_REMOVEITEM_FAILURE = 30081,
|
LANG_REMOVEITEM_FAILURE = 30081,
|
||||||
LANG_REMOVEITEM_ERROR = 30082
|
LANG_REMOVEITEM_ERROR = 30082,
|
||||||
|
|
||||||
|
LANG_BG_SHARE_QUEST_ERROR = 30083,
|
||||||
|
LANG_BG_READY_CHECK_ERROR = 30084
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1142,6 +1142,8 @@ void World::LoadConfigSettings(bool reload)
|
|||||||
m_float_configs[CONFIG_LISTEN_RANGE_TEXTEMOTE] = sConfigMgr->GetFloatDefault("ListenRange.TextEmote", 25.0f);
|
m_float_configs[CONFIG_LISTEN_RANGE_TEXTEMOTE] = sConfigMgr->GetFloatDefault("ListenRange.TextEmote", 25.0f);
|
||||||
m_float_configs[CONFIG_LISTEN_RANGE_YELL] = sConfigMgr->GetFloatDefault("ListenRange.Yell", 300.0f);
|
m_float_configs[CONFIG_LISTEN_RANGE_YELL] = sConfigMgr->GetFloatDefault("ListenRange.Yell", 300.0f);
|
||||||
|
|
||||||
|
m_bool_configs[CONFIG_BATTLEGROUND_DISABLE_QUEST_SHARE_IN_BG] = sConfigMgr->GetBoolDefault("Battleground.DisableQuestShareInBG", false);
|
||||||
|
m_bool_configs[CONFIG_BATTLEGROUND_DISABLE_READY_CHECK_IN_BG] = sConfigMgr->GetBoolDefault("Battleground.DisableReadyCheckInBG", false);
|
||||||
m_bool_configs[CONFIG_BATTLEGROUND_CAST_DESERTER] = sConfigMgr->GetBoolDefault("Battleground.CastDeserter", true);
|
m_bool_configs[CONFIG_BATTLEGROUND_CAST_DESERTER] = sConfigMgr->GetBoolDefault("Battleground.CastDeserter", true);
|
||||||
m_bool_configs[CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE] = sConfigMgr->GetBoolDefault("Battleground.QueueAnnouncer.Enable", false);
|
m_bool_configs[CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE] = sConfigMgr->GetBoolDefault("Battleground.QueueAnnouncer.Enable", false);
|
||||||
m_bool_configs[CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY] = sConfigMgr->GetBoolDefault("Battleground.QueueAnnouncer.PlayerOnly", false);
|
m_bool_configs[CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY] = sConfigMgr->GetBoolDefault("Battleground.QueueAnnouncer.PlayerOnly", false);
|
||||||
|
|||||||
@@ -116,6 +116,8 @@ enum WorldBoolConfigs
|
|||||||
CONFIG_DEATH_BONES_BG_OR_ARENA,
|
CONFIG_DEATH_BONES_BG_OR_ARENA,
|
||||||
CONFIG_DIE_COMMAND_MODE,
|
CONFIG_DIE_COMMAND_MODE,
|
||||||
CONFIG_DECLINED_NAMES_USED,
|
CONFIG_DECLINED_NAMES_USED,
|
||||||
|
CONFIG_BATTLEGROUND_DISABLE_QUEST_SHARE_IN_BG,
|
||||||
|
CONFIG_BATTLEGROUND_DISABLE_READY_CHECK_IN_BG,
|
||||||
CONFIG_BATTLEGROUND_CAST_DESERTER,
|
CONFIG_BATTLEGROUND_CAST_DESERTER,
|
||||||
CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE,
|
CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE,
|
||||||
CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY,
|
CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY,
|
||||||
|
|||||||
@@ -2762,6 +2762,22 @@ Battleground.TrackDeserters.Enable = 1
|
|||||||
|
|
||||||
Battleground.InvitationType = 0
|
Battleground.InvitationType = 0
|
||||||
|
|
||||||
|
#
|
||||||
|
# Battleground.DisableQuestShareInBG
|
||||||
|
# Description: Disables the ability to share quests while in a Battleground.
|
||||||
|
# Default: 0 - (Disabled)
|
||||||
|
# 1 - (Enabled)
|
||||||
|
|
||||||
|
Battleground.DisableQuestShareInBG = 0
|
||||||
|
|
||||||
|
#
|
||||||
|
# Battleground.DisableReadyCheckInBG
|
||||||
|
# Description: Disables the ability to send a Ready Check survey while in a Battleground.
|
||||||
|
# Default: 0 - (Disabled)
|
||||||
|
# 1 - (Enabled)
|
||||||
|
|
||||||
|
Battleground.DisableReadyCheckInBG = 0
|
||||||
|
|
||||||
#
|
#
|
||||||
# Battleground.RewardWinnerHonorFirst
|
# Battleground.RewardWinnerHonorFirst
|
||||||
# Battleground.RewardWinnerArenaFirst
|
# Battleground.RewardWinnerArenaFirst
|
||||||
|
|||||||
Reference in New Issue
Block a user