mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 03:15:41 +00:00
feat(Core/Player): allow to queue both RDF & BGs together (#10102)
This commit is contained in:
committed by
GitHub
parent
2fce4e0f12
commit
a1c415b226
@@ -154,8 +154,11 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket& recvData)
|
||||
{
|
||||
if (GetPlayer()->InBattleground()) // currently in battleground
|
||||
err = ERR_BATTLEGROUND_NOT_IN_BATTLEGROUND;
|
||||
else if (GetPlayer()->isUsingLfg()) // using lfg system
|
||||
err = ERR_LFG_CANT_USE_BATTLEGROUND;
|
||||
else if (!sWorld->getBoolConfig(CONFIG_ALLOW_JOIN_BG_AND_LFG))
|
||||
{
|
||||
if (GetPlayer()->isUsingLfg()) // using lfg system
|
||||
err = ERR_LFG_CANT_USE_BATTLEGROUND;
|
||||
}
|
||||
else if (!_player->CanJoinToBattleground()) // has deserter debuff
|
||||
err = ERR_GROUP_JOIN_BATTLEGROUND_DESERTERS;
|
||||
else if (_player->InBattlegroundQueueForBattlegroundQueueType(bgQueueTypeIdRandom)) // queued for random bg, so can't queue for anything else
|
||||
@@ -672,8 +675,11 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket& recvData)
|
||||
{
|
||||
if (GetPlayer()->InBattleground()) // currently in battleground
|
||||
err = ERR_BATTLEGROUND_NOT_IN_BATTLEGROUND;
|
||||
else if (GetPlayer()->isUsingLfg()) // using lfg system
|
||||
err = ERR_LFG_CANT_USE_BATTLEGROUND;
|
||||
else if (!sWorld->getBoolConfig(CONFIG_ALLOW_JOIN_BG_AND_LFG))
|
||||
{
|
||||
if (GetPlayer()->isUsingLfg()) // using lfg system
|
||||
err = ERR_LFG_CANT_USE_BATTLEGROUND;
|
||||
}
|
||||
|
||||
if (err <= 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user