feat(Core/Player): Implement option to convert excess honor points int… (#10565)

This commit is contained in:
Skjalf
2022-02-09 18:04:56 -03:00
committed by GitHub
parent 7a6126ecd6
commit fb890b3310
4 changed files with 28 additions and 0 deletions
+1
View File
@@ -228,6 +228,7 @@ enum WorldIntConfigs
CONFIG_START_HEROIC_PLAYER_LEVEL,
CONFIG_START_PLAYER_MONEY,
CONFIG_MAX_HONOR_POINTS,
CONFIG_MAX_HONOR_POINTS_MONEY_PER_POINT,
CONFIG_START_HONOR_POINTS,
CONFIG_MAX_ARENA_POINTS,
CONFIG_START_ARENA_POINTS,
+7
View File
@@ -844,6 +844,13 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_MAX_HONOR_POINTS] = 0;
}
m_int_configs[CONFIG_MAX_HONOR_POINTS_MONEY_PER_POINT] = sConfigMgr->GetOption<int32>("MaxHonorPointsMoneyPerPoint", 0);
if (int32(m_int_configs[CONFIG_MAX_HONOR_POINTS_MONEY_PER_POINT]) < 0)
{
LOG_ERROR("server.loading", "MaxHonorPointsMoneyPerPoint ({}) can't be negative. Set to 0.", m_int_configs[CONFIG_MAX_HONOR_POINTS_MONEY_PER_POINT]);
m_int_configs[CONFIG_MAX_HONOR_POINTS_MONEY_PER_POINT] = 0;
}
m_int_configs[CONFIG_START_HONOR_POINTS] = sConfigMgr->GetOption<int32>("StartHonorPoints", 0);
if (int32(m_int_configs[CONFIG_START_HONOR_POINTS]) < 0 || int32(m_int_configs[CONFIG_START_HONOR_POINTS]) > int32(m_int_configs[CONFIG_MAX_HONOR_POINTS]))
{