mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 13:16:23 +00:00
fix(Core/Battlegrounds): Fixed timed announcement system for CrossfactionBG module. (#8521)
- Closes #6637
This commit is contained in:
@@ -47,6 +47,7 @@ BattlegroundQueue::BattlegroundQueue() : m_bgTypeId(BATTLEGROUND_TYPE_NONE), m_a
|
||||
}
|
||||
|
||||
_queueAnnouncementTimer.fill(-1);
|
||||
_queueAnnouncementCrossfactioned = false;
|
||||
}
|
||||
|
||||
BattlegroundQueue::~BattlegroundQueue()
|
||||
@@ -955,7 +956,17 @@ void BattlegroundQueue::BattlegroundQueueUpdate(uint32 diff, BattlegroundBracket
|
||||
|
||||
if (sWorld->getBoolConfig(CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_TIMED))
|
||||
{
|
||||
uint32 qPlayers = GetPlayersCountInGroupsQueue(bracket_id, BG_QUEUE_NORMAL_HORDE) + GetPlayersCountInGroupsQueue(bracket_id, BG_QUEUE_NORMAL_ALLIANCE);
|
||||
uint32 qPlayers = 0;
|
||||
|
||||
if (_queueAnnouncementCrossfactioned)
|
||||
{
|
||||
qPlayers = GetPlayersCountInGroupsQueue(bracket_id, BG_QUEUE_CFBG);
|
||||
}
|
||||
else
|
||||
{
|
||||
qPlayers = GetPlayersCountInGroupsQueue(bracket_id, BG_QUEUE_NORMAL_HORDE) + GetPlayersCountInGroupsQueue(bracket_id, BG_QUEUE_NORMAL_ALLIANCE);
|
||||
}
|
||||
|
||||
if (!qPlayers)
|
||||
{
|
||||
_queueAnnouncementTimer[bracket_id] = -1;
|
||||
@@ -1150,6 +1161,17 @@ void BattlegroundQueue::SendExitMessageArenaQueue(GroupQueueInfo* ginfo)
|
||||
sWorld->SendWorldText(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_EXIT, TeamName.c_str(), ArenaType, ArenaType, ArenaTeamRating);
|
||||
}
|
||||
|
||||
void BattlegroundQueue::SetQueueAnnouncementTimer(uint32 bracketId, int32 timer)
|
||||
{
|
||||
_queueAnnouncementTimer[bracketId] = timer;
|
||||
_queueAnnouncementCrossfactioned = true;
|
||||
}
|
||||
|
||||
int32 BattlegroundQueue::GetQueueAnnouncementTimer(uint32 bracketId) const
|
||||
{
|
||||
return _queueAnnouncementTimer[bracketId];
|
||||
}
|
||||
|
||||
/*********************************************************/
|
||||
/*** BATTLEGROUND QUEUE EVENTS ***/
|
||||
/*********************************************************/
|
||||
|
||||
Reference in New Issue
Block a user