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:
Stefano Borzì
2024-09-08 20:05:58 +02:00
committed by GitHub
parent cf95c1dfbd
commit 0dd5c6e3b4
5 changed files with 17 additions and 1 deletions

View File

@@ -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();