Merge branch 'azerothcore:master' into Playerbot

This commit is contained in:
ZhengPeiRu21
2022-04-11 08:40:56 -06:00
committed by GitHub
51 changed files with 3015 additions and 145 deletions
+7 -1
View File
@@ -1871,7 +1871,7 @@ void Group::UpdateLooterGuid(WorldObject* pLootedObject, bool ifneed)
}
}
GroupJoinBattlegroundResult Group::CanJoinBattlegroundQueue(Battleground const* bgTemplate, BattlegroundQueueTypeId /*bgQueueTypeId*/, uint32 MinPlayerCount, uint32 /*MaxPlayerCount*/, bool isRated, uint32 arenaSlot)
GroupJoinBattlegroundResult Group::CanJoinBattlegroundQueue(Battleground const* bgTemplate, BattlegroundQueueTypeId bgQueueTypeId, uint32 MinPlayerCount, uint32 /*MaxPlayerCount*/, bool isRated, uint32 arenaSlot)
{
// check if this group is LFG group
if (isLFGGroup())
@@ -1944,6 +1944,12 @@ GroupJoinBattlegroundResult Group::CanJoinBattlegroundQueue(Battleground const*
if (!member->HasFreeBattlegroundQueueId())
return ERR_BATTLEGROUND_TOO_MANY_QUEUES;
// don't let join if someone from the group is already in that bg queue
if (member->InBattlegroundQueueForBattlegroundQueueType(bgQueueTypeId))
{
return ERR_BATTLEGROUND_JOIN_FAILED;
}
// don't let join if someone from the group is in bg queue random
if (member->InBattlegroundQueueForBattlegroundQueueType(bgQueueTypeIdRandom))
return ERR_IN_RANDOM_BG;