feat(Core/Config): Arena points - Games required (#3811)

This commit is contained in:
aradep
2020-12-12 02:36:00 -04:00
committed by GitHub
parent 48f418e7e2
commit 7d16417d16
4 changed files with 10 additions and 1 deletions

View File

@@ -865,7 +865,7 @@ void ArenaTeam::UpdateArenaPointsHelper(std::map<uint32, uint32>& playerPoints)
// Called after a match has ended and the stats are already modified
// Helper function for arena point distribution (this way, when distributing, no actual calculation is required, just a few comparisons)
// 10 played games per week is a minimum
if (Stats.WeekGames < 10)
if (Stats.WeekGames < sWorld->getIntConfig(CONFIG_ARENA_GAMES_REQUIRED))
return;
// To get points, a player has to participate in at least 30% of the matches

View File

@@ -1145,6 +1145,7 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_ARENA_RATING_DISCARD_TIMER] = sConfigMgr->GetIntDefault ("Arena.RatingDiscardTimer", 10 * MINUTE * IN_MILLISECONDS);
m_bool_configs[CONFIG_ARENA_AUTO_DISTRIBUTE_POINTS] = sConfigMgr->GetBoolDefault("Arena.AutoDistributePoints", false);
m_int_configs[CONFIG_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS] = sConfigMgr->GetIntDefault ("Arena.AutoDistributeInterval", 7); // pussywizard: spoiled by implementing constant day and hour, always 7 now
m_int_configs[CONFIG_ARENA_GAMES_REQUIRED] = sConfigMgr->GetIntDefault ("Arena.GamesRequired", 10);
m_int_configs[CONFIG_ARENA_SEASON_ID] = sConfigMgr->GetIntDefault ("Arena.ArenaSeason.ID", 1);
m_int_configs[CONFIG_ARENA_START_RATING] = sConfigMgr->GetIntDefault ("Arena.ArenaStartRating", 0);
m_int_configs[CONFIG_ARENA_START_PERSONAL_RATING] = sConfigMgr->GetIntDefault ("Arena.ArenaStartPersonalRating", 1000);

View File

@@ -303,6 +303,7 @@ enum WorldIntConfigs
CONFIG_ARENA_MAX_RATING_DIFFERENCE,
CONFIG_ARENA_RATING_DISCARD_TIMER,
CONFIG_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS,
CONFIG_ARENA_GAMES_REQUIRED,
CONFIG_ARENA_SEASON_ID,
CONFIG_ARENA_START_RATING,
CONFIG_ARENA_START_PERSONAL_RATING,

View File

@@ -2936,6 +2936,13 @@ Arena.AutoDistributePoints = 0
Arena.AutoDistributeInterval = 7
#
# Arena.GamesRequired
# Description: Number of arena matches teams must participate in to be eligible for arena point distribution.
# Default: 10
Arena.GamesRequired = 10
#
# Arena.QueueAnnouncer.Enable
# Description: Announce arena queue status to chat.