@@ -1426,6 +1426,18 @@ void World::LoadConfigSettings(bool reload)
1426
1426
TC_LOG_INFO (" server.loading" , " VMap data directory is: {}vmaps" , m_dataPath);
1427
1427
1428
1428
m_int_configs[CONFIG_MAX_WHO] = sConfigMgr ->GetIntDefault (" MaxWhoListReturns" , 49 );
1429
+ m_int_configs[CONFIG_WHO_LIST_UPDATE_INTERVAL] = sConfigMgr ->GetIntDefault (" WhoList.Update.Interval" , 5 );
1430
+ if (int32 (m_int_configs[CONFIG_WHO_LIST_UPDATE_INTERVAL]) <= 0 )
1431
+ {
1432
+ TC_LOG_ERROR (" server.loading" , " WhoList.Update.Interval ({}) must be > 0, set to default 5 seconds." , m_int_configs[CONFIG_WHO_LIST_UPDATE_INTERVAL]);
1433
+ m_int_configs[CONFIG_WHO_LIST_UPDATE_INTERVAL] = 5 ;
1434
+ }
1435
+ if (reload)
1436
+ {
1437
+ m_timers[WUPDATE_WHO_LIST].SetInterval (m_int_configs[CONFIG_WHO_LIST_UPDATE_INTERVAL] * IN_MILLISECONDS);
1438
+ m_timers[WUPDATE_WHO_LIST].Reset ();
1439
+ }
1440
+
1429
1441
m_bool_configs[CONFIG_START_ALL_SPELLS] = sConfigMgr ->GetBoolDefault (" PlayerStart.AllSpells" , false );
1430
1442
m_int_configs[CONFIG_HONOR_AFTER_DUEL] = sConfigMgr ->GetIntDefault (" HonorPointsAfterDuel" , 0 );
1431
1443
m_bool_configs[CONFIG_RESET_DUEL_COOLDOWNS] = sConfigMgr ->GetBoolDefault (" ResetDuelCooldowns" , false );
@@ -2144,7 +2156,7 @@ void World::SetInitialWorldSettings()
2144
2156
2145
2157
m_timers[WUPDATE_CHECK_FILECHANGES].SetInterval (500 );
2146
2158
2147
- m_timers[WUPDATE_WHO_LIST].SetInterval (5 * IN_MILLISECONDS); // update who list cache every 5 seconds
2159
+ m_timers[WUPDATE_WHO_LIST].SetInterval (getIntConfig (CONFIG_WHO_LIST_UPDATE_INTERVAL) * IN_MILLISECONDS); // update who list cache every 5 seconds
2148
2160
2149
2161
m_timers[WUPDATE_CHANNEL_SAVE].SetInterval (getIntConfig (CONFIG_PRESERVE_CUSTOM_CHANNEL_INTERVAL) * MINUTE * IN_MILLISECONDS);
2150
2162
0 commit comments