Core/Battlegrounds: Introduce Arena.RatedUpdateTimer to configure time between checks for rated arena matches.
This commit is contained in:
@@ -55,7 +55,7 @@ BattlegroundMgr::BattlegroundMgr() : m_AutoDistributionTimeChecker(0), m_ArenaTe
|
|||||||
{
|
{
|
||||||
for (uint32 i = BATTLEGROUND_TYPE_NONE; i < MAX_BATTLEGROUND_TYPE_ID; i++)
|
for (uint32 i = BATTLEGROUND_TYPE_NONE; i < MAX_BATTLEGROUND_TYPE_ID; i++)
|
||||||
m_Battlegrounds[i].clear();
|
m_Battlegrounds[i].clear();
|
||||||
m_NextRatingDiscardUpdate = sWorld->getIntConfig(CONFIG_ARENA_RATING_DISCARD_TIMER);
|
m_NextRatedArenaUpdate = sWorld->getIntConfig(CONFIG_ARENA_RATED_UPDATE_TIMER);
|
||||||
m_Testing=false;
|
m_Testing=false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,10 +143,10 @@ void BattlegroundMgr::Update(uint32 diff)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// if rating difference counts, maybe force-update queues
|
// if rating difference counts, maybe force-update queues
|
||||||
if (sWorld->getIntConfig(CONFIG_ARENA_MAX_RATING_DIFFERENCE) && sWorld->getIntConfig(CONFIG_ARENA_RATING_DISCARD_TIMER))
|
if (sWorld->getIntConfig(CONFIG_ARENA_MAX_RATING_DIFFERENCE) && sWorld->getIntConfig(CONFIG_ARENA_RATED_UPDATE_TIMER))
|
||||||
{
|
{
|
||||||
// it's time to force update
|
// it's time to force update
|
||||||
if (m_NextRatingDiscardUpdate < diff)
|
if (m_NextRatedArenaUpdate < diff)
|
||||||
{
|
{
|
||||||
// forced update for rated arenas (scan all, but skipped non rated)
|
// forced update for rated arenas (scan all, but skipped non rated)
|
||||||
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "BattlegroundMgr: UPDATING ARENA QUEUES");
|
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "BattlegroundMgr: UPDATING ARENA QUEUES");
|
||||||
@@ -156,10 +156,10 @@ void BattlegroundMgr::Update(uint32 diff)
|
|||||||
BATTLEGROUND_AA, BattlegroundBracketId(bracket),
|
BATTLEGROUND_AA, BattlegroundBracketId(bracket),
|
||||||
BattlegroundMgr::BGArenaType(BattlegroundQueueTypeId(qtype)), true, 0);
|
BattlegroundMgr::BGArenaType(BattlegroundQueueTypeId(qtype)), true, 0);
|
||||||
|
|
||||||
m_NextRatingDiscardUpdate = sWorld->getIntConfig(CONFIG_ARENA_RATING_DISCARD_TIMER);
|
m_NextRatedArenaUpdate = sWorld->getIntConfig(CONFIG_ARENA_RATED_UPDATE_TIMER);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
m_NextRatingDiscardUpdate -= diff;
|
m_NextRatedArenaUpdate -= diff;
|
||||||
}
|
}
|
||||||
if (sWorld->getBoolConfig(CONFIG_ARENA_AUTO_DISTRIBUTE_POINTS))
|
if (sWorld->getBoolConfig(CONFIG_ARENA_AUTO_DISTRIBUTE_POINTS))
|
||||||
{
|
{
|
||||||
@@ -1137,4 +1137,4 @@ BattlegroundTypeId BattlegroundMgr::WeekendHolidayIdToBGType(HolidayIds holiday)
|
|||||||
bool BattlegroundMgr::IsBGWeekend(BattlegroundTypeId bgTypeId)
|
bool BattlegroundMgr::IsBGWeekend(BattlegroundTypeId bgTypeId)
|
||||||
{
|
{
|
||||||
return IsHolidayActive(BGTypeToWeekendHolidayId(bgTypeId));
|
return IsHolidayActive(BGTypeToWeekendHolidayId(bgTypeId));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ class BattlegroundMgr
|
|||||||
BattlegroundSelectionWeightMap m_BGSelectionWeights;
|
BattlegroundSelectionWeightMap m_BGSelectionWeights;
|
||||||
std::vector<uint64> m_QueueUpdateScheduler;
|
std::vector<uint64> m_QueueUpdateScheduler;
|
||||||
std::set<uint32> m_ClientBattlegroundIds[MAX_BATTLEGROUND_TYPE_ID][MAX_BATTLEGROUND_BRACKETS]; //the instanceids just visible for the client
|
std::set<uint32> m_ClientBattlegroundIds[MAX_BATTLEGROUND_TYPE_ID][MAX_BATTLEGROUND_BRACKETS]; //the instanceids just visible for the client
|
||||||
uint32 m_NextRatingDiscardUpdate;
|
uint32 m_NextRatedArenaUpdate;
|
||||||
time_t m_NextAutoDistributionTime;
|
time_t m_NextAutoDistributionTime;
|
||||||
uint32 m_AutoDistributionTimeChecker;
|
uint32 m_AutoDistributionTimeChecker;
|
||||||
bool m_ArenaTesting;
|
bool m_ArenaTesting;
|
||||||
|
|||||||
@@ -1022,6 +1022,7 @@ void World::LoadConfigSettings(bool reload)
|
|||||||
m_bool_configs[CONFIG_BG_XP_FOR_KILL] = ConfigMgr::GetBoolDefault("Battleground.GiveXPForKills", false);
|
m_bool_configs[CONFIG_BG_XP_FOR_KILL] = ConfigMgr::GetBoolDefault("Battleground.GiveXPForKills", false);
|
||||||
m_int_configs[CONFIG_ARENA_MAX_RATING_DIFFERENCE] = ConfigMgr::GetIntDefault ("Arena.MaxRatingDifference", 150);
|
m_int_configs[CONFIG_ARENA_MAX_RATING_DIFFERENCE] = ConfigMgr::GetIntDefault ("Arena.MaxRatingDifference", 150);
|
||||||
m_int_configs[CONFIG_ARENA_RATING_DISCARD_TIMER] = ConfigMgr::GetIntDefault ("Arena.RatingDiscardTimer", 10 * MINUTE * IN_MILLISECONDS);
|
m_int_configs[CONFIG_ARENA_RATING_DISCARD_TIMER] = ConfigMgr::GetIntDefault ("Arena.RatingDiscardTimer", 10 * MINUTE * IN_MILLISECONDS);
|
||||||
|
m_int_configs[CONFIG_ARENA_RATED_UPDATE_TIMER] = ConfigMgr::GetIntDefault ("Arena.RatedUpdateTimer", 5 * IN_MILLISECONDS);
|
||||||
m_bool_configs[CONFIG_ARENA_AUTO_DISTRIBUTE_POINTS] = ConfigMgr::GetBoolDefault("Arena.AutoDistributePoints", false);
|
m_bool_configs[CONFIG_ARENA_AUTO_DISTRIBUTE_POINTS] = ConfigMgr::GetBoolDefault("Arena.AutoDistributePoints", false);
|
||||||
m_int_configs[CONFIG_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS] = ConfigMgr::GetIntDefault ("Arena.AutoDistributeInterval", 7);
|
m_int_configs[CONFIG_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS] = ConfigMgr::GetIntDefault ("Arena.AutoDistributeInterval", 7);
|
||||||
m_bool_configs[CONFIG_ARENA_QUEUE_ANNOUNCER_ENABLE] = ConfigMgr::GetBoolDefault("Arena.QueueAnnouncer.Enable", false);
|
m_bool_configs[CONFIG_ARENA_QUEUE_ANNOUNCER_ENABLE] = ConfigMgr::GetBoolDefault("Arena.QueueAnnouncer.Enable", false);
|
||||||
|
|||||||
@@ -279,6 +279,7 @@ enum WorldIntConfigs
|
|||||||
CONFIG_BATTLEGROUND_PREMADE_GROUP_WAIT_FOR_MATCH,
|
CONFIG_BATTLEGROUND_PREMADE_GROUP_WAIT_FOR_MATCH,
|
||||||
CONFIG_ARENA_MAX_RATING_DIFFERENCE,
|
CONFIG_ARENA_MAX_RATING_DIFFERENCE,
|
||||||
CONFIG_ARENA_RATING_DISCARD_TIMER,
|
CONFIG_ARENA_RATING_DISCARD_TIMER,
|
||||||
|
CONFIG_ARENA_RATED_UPDATE_TIMER,
|
||||||
CONFIG_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS,
|
CONFIG_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS,
|
||||||
CONFIG_ARENA_SEASON_ID,
|
CONFIG_ARENA_SEASON_ID,
|
||||||
CONFIG_ARENA_START_RATING,
|
CONFIG_ARENA_START_RATING,
|
||||||
|
|||||||
@@ -2513,6 +2513,13 @@ Arena.MaxRatingDifference = 150
|
|||||||
|
|
||||||
Arena.RatingDiscardTimer = 600000
|
Arena.RatingDiscardTimer = 600000
|
||||||
|
|
||||||
|
#
|
||||||
|
# Arena.RatedUpdateTimer
|
||||||
|
# Description: Time (in milliseconds) between checks for matchups in rated arena
|
||||||
|
# Default: 5000 - (5 seconds)
|
||||||
|
|
||||||
|
Arena.RatedUpdateTimer = 5000
|
||||||
|
|
||||||
#
|
#
|
||||||
# Arena.AutoDistributePoints
|
# Arena.AutoDistributePoints
|
||||||
# Description: Automatically distribute arena points.
|
# Description: Automatically distribute arena points.
|
||||||
|
|||||||
Reference in New Issue
Block a user