mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-16 00:36:07 +00:00
feat(Core/BG): allow MinPlayersPerTeam override for low-levels (#20083)
This commit is contained in:
@@ -31,6 +31,8 @@
|
||||
#include "ScriptMgr.h"
|
||||
#include <unordered_map>
|
||||
|
||||
#include "BattlegroundUtils.h"
|
||||
|
||||
/*********************************************************/
|
||||
/*** BATTLEGROUND QUEUE SYSTEM ***/
|
||||
/*********************************************************/
|
||||
@@ -760,7 +762,7 @@ void BattlegroundQueue::BattlegroundQueueUpdate(uint32 diff, BattlegroundTypeId
|
||||
}
|
||||
|
||||
// get min and max players per team
|
||||
uint32 MinPlayersPerTeam = bg_template->GetMinPlayersPerTeam();
|
||||
uint32 MinPlayersPerTeam = GetMinPlayersPerTeam(bg_template, bracketEntry);
|
||||
uint32 MaxPlayersPerTeam = bg_template->GetMaxPlayersPerTeam();
|
||||
|
||||
if (bg_template->isArena())
|
||||
@@ -996,7 +998,7 @@ void BattlegroundQueue::BattlegroundQueueAnnouncerUpdate(uint32 diff, Battlegrou
|
||||
_queueAnnouncementTimer[bracket_id] = -1;
|
||||
|
||||
auto bgName = bg_template->GetName();
|
||||
uint32 MaxPlayers = bg_template->GetMinPlayersPerTeam() * 2;
|
||||
uint32 MaxPlayers = GetMinPlayersPerTeam(bg_template, bracketEntry) * 2;
|
||||
uint32 q_min_level = std::min(bracketEntry->minLevel, (uint32) 80);
|
||||
uint32 q_max_level = std::min(bracketEntry->maxLevel, (uint32) 80);
|
||||
|
||||
@@ -1047,7 +1049,7 @@ void BattlegroundQueue::SendMessageBGQueue(Player* leader, Battleground* bg, PvP
|
||||
|
||||
BattlegroundBracketId bracketId = bracketEntry->GetBracketId();
|
||||
auto bgName = bg->GetName();
|
||||
uint32 MinPlayers = bg->GetMinPlayersPerTeam();
|
||||
uint32 MinPlayers = GetMinPlayersPerTeam(bg, bracketEntry);
|
||||
uint32 MaxPlayers = MinPlayers * 2;
|
||||
uint32 q_min_level = std::min(bracketEntry->minLevel, (uint32)80);
|
||||
uint32 q_max_level = std::min(bracketEntry->maxLevel, (uint32)80);
|
||||
|
||||
Reference in New Issue
Block a user