Revert "Revert "Merge branch 'master' into Playerbot""

This reverts commit 2358b256f2.
This commit is contained in:
Yunfan Li
2024-09-17 23:14:42 +08:00
parent 57b7a6a4eb
commit 910848c51b
32 changed files with 529 additions and 489 deletions
+4 -1
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();
@@ -611,6 +611,8 @@ inline void Battleground::_ProcessJoin(uint32 diff)
}
m_ToBeTeleported.clear();
}
sScriptMgr->OnArenaStart(this);
}
else
{
@@ -773,6 +773,10 @@ void BattlegroundQueue::BattlegroundQueueUpdate(uint32 diff, BattlegroundTypeId
sScriptMgr->OnQueueUpdate(this, diff, bgTypeId, bracket_id, arenaType, isRated, arenaRating);
if (!sScriptMgr->OnQueueUpdateValidity(this, diff, bgTypeId, bracket_id, arenaType, isRated, arenaRating)) {
return;
}
m_SelectionPools[TEAM_ALLIANCE].Init();
m_SelectionPools[TEAM_HORDE].Init();