mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 21:26:23 +00:00
feat(Core/Config): Configurable Water Breath Timer (#11945)
* feat(Core/Config): Configurable Water Breath Timer * Config Formatting Add missing linebreaks * Use int instead of float for water breath timer * Correctly get CONFIG_WATER_BREATH as Int instead of Float value * Move CONFIG_WATER_BREATH_TIMER to WorldInt configs * More logical WaterBreath configuration
This commit is contained in:
@@ -401,6 +401,7 @@ enum WorldIntConfigs
|
||||
CONFIG_LFG_MAX_KICK_COUNT,
|
||||
CONFIG_LFG_KICK_PREVENTION_TIMER,
|
||||
CONFIG_CHANGE_FACTION_MAX_MONEY,
|
||||
CONFIG_WATER_BREATH_TIMER,
|
||||
INT_CONFIG_VALUE_COUNT
|
||||
};
|
||||
|
||||
|
||||
@@ -1184,6 +1184,13 @@ void World::LoadConfigSettings(bool reload)
|
||||
m_bool_configs[CONFIG_OFFHAND_CHECK_AT_SPELL_UNLEARN] = sConfigMgr->GetOption<bool>("OffhandCheckAtSpellUnlearn", true);
|
||||
m_int_configs[CONFIG_CREATURE_STOP_FOR_PLAYER] = sConfigMgr->GetOption<uint32>("Creature.MovingStopTimeForPlayer", 3 * MINUTE * IN_MILLISECONDS);
|
||||
|
||||
m_int_configs[CONFIG_WATER_BREATH_TIMER] = sConfigMgr->GetOption<uint32>("WaterBreath.Timer", 180000);
|
||||
if (m_int_configs[CONFIG_WATER_BREATH_TIMER] <= 0)
|
||||
{
|
||||
LOG_ERROR("server.loading", "WaterBreath.Timer ({}) must be > 0. Using 180000 instead.", m_int_configs[CONFIG_WATER_BREATH_TIMER]);
|
||||
m_int_configs[CONFIG_WATER_BREATH_TIMER] = 180000;
|
||||
}
|
||||
|
||||
if (int32 clientCacheId = sConfigMgr->GetOption<int32>("ClientCacheVersion", 0))
|
||||
{
|
||||
// overwrite DB/old value
|
||||
|
||||
Reference in New Issue
Block a user