diff options
Diffstat (limited to 'src/game/Group.cpp')
-rw-r--r-- | src/game/Group.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/game/Group.cpp b/src/game/Group.cpp index d5daaca4e90..5087a200da6 100644 --- a/src/game/Group.cpp +++ b/src/game/Group.cpp @@ -1485,19 +1485,19 @@ void Group::UpdateLooterGuid(WorldObject* pLootedObject, bool ifneed) } } -GroupJoinBattlegroundResult Group::CanJoinBattleGroundQueue(BattleGround const* bgOrTemplate, BattleGroundQueueTypeId bgQueueTypeId, uint32 MinPlayerCount, uint32 MaxPlayerCount, bool isRated, uint32 arenaSlot) +GroupJoinBattlegroundResult Group::CanJoinBattleGroundQueue(BattleGround const* bgOrTemplate, BattleGroundQueueTypeId bgQueueTypeId, uint32 MinPlayerCount, uint32 MaxPlayerCount, bool isRated, uint32 arenaSlot) { BattlemasterListEntry const* bgEntry = sBattlemasterListStore.LookupEntry(bgOrTemplate->GetTypeID()); - if (!bgEntry) - return ERR_GROUP_JOIN_BATTLEGROUND_FAIL; // shouldn't happen + if (!bgEntry) + return ERR_GROUP_JOIN_BATTLEGROUND_FAIL; // shouldn't happen // check for min / max count uint32 memberscount = GetMembersCount(); - - // only check for MinPlayerCount since MinPlayerCount == MaxPlayerCount for arenas... - if (bgOrTemplate->isArena() && memberscount != MinPlayerCount) - return ERR_ARENA_TEAM_PARTY_SIZE; - + + // only check for MinPlayerCount since MinPlayerCount == MaxPlayerCount for arenas... + if (bgOrTemplate->isArena() && memberscount != MinPlayerCount) + return ERR_ARENA_TEAM_PARTY_SIZE; + if (memberscount > bgEntry->maxGroupSize) // no MinPlayerCount for battlegrounds return ERR_BATTLEGROUND_NONE; // ERR_GROUP_JOIN_BATTLEGROUND_TOO_MANY handled on client side |