feat(Core/Player): allow to queue both RDF & BGs together (#10102)

This commit is contained in:
IntelligentQuantum
2022-01-25 12:51:01 +03:30
committed by GitHub
parent 2fce4e0f12
commit a1c415b226
5 changed files with 34 additions and 8 deletions

View File

@@ -605,8 +605,11 @@ namespace lfg
if (!isRaid && joinData.result == LFG_JOIN_OK)
{
// Check player or group member restrictions
if (player->InBattleground() || player->InArena() || player->InBattlegroundQueue())
joinData.result = LFG_JOIN_USING_BG_SYSTEM;
if (!sWorld->getBoolConfig(CONFIG_ALLOW_JOIN_BG_AND_LFG))
{
if (player->InBattleground() || player->InArena() || player->InBattlegroundQueue())
joinData.result = LFG_JOIN_USING_BG_SYSTEM;
}
else if (player->HasAura(LFG_SPELL_DUNGEON_DESERTER))
joinData.result = LFG_JOIN_DESERTER;
else if (dungeons.empty())
@@ -623,9 +626,15 @@ namespace lfg
if (Player* plrg = itr->GetSource())
{
if (plrg->HasAura(LFG_SPELL_DUNGEON_DESERTER))
{
joinData.result = LFG_JOIN_PARTY_DESERTER;
else if (plrg->InBattleground() || plrg->InArena() || plrg->InBattlegroundQueue())
joinData.result = LFG_JOIN_USING_BG_SYSTEM;
}
else if (!sWorld->getBoolConfig(CONFIG_ALLOW_JOIN_BG_AND_LFG))
{
if (plrg->InBattleground() || plrg->InArena() || plrg->InBattlegroundQueue())
joinData.result = LFG_JOIN_USING_BG_SYSTEM;
}
++memberCount;
players.insert(plrg->GetGUID());
}