mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-26 23:26:23 +00:00
feat(Battlegrounds): make it compatible with custom arena type (#18679)
* feat(Battlegrounds): make it compatible with custom arena type * fix(BattlegroundQueue.cpp): ignore bg for arena condition * feat(Scripting): add OnQueueUpdateValidity hook * fix: codestyle
This commit is contained in:
@@ -1034,7 +1034,10 @@ void ArenaTeam::CreateTempArenaTeam(std::vector<Player*> playerList, uint8 type,
|
||||
{
|
||||
auto playerCountInTeam = static_cast<uint32>(playerList.size());
|
||||
|
||||
ASSERT(playerCountInTeam == GetReqPlayersForType(type));
|
||||
const auto standardArenaType = { ARENA_TYPE_2v2, ARENA_TYPE_3v3, ARENA_TYPE_5v5 };
|
||||
bool isStandardArenaType = std::find(std::begin(standardArenaType), std::end(standardArenaType), type) != std::end(standardArenaType);
|
||||
if (isStandardArenaType)
|
||||
ASSERT(playerCountInTeam == GetReqPlayersForType(type));
|
||||
|
||||
// Generate new arena team id
|
||||
TeamId = sArenaTeamMgr->GenerateTempArenaTeamId();
|
||||
|
||||
Reference in New Issue
Block a user