mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-03 02:53:48 +00:00
fix(Core/Weather): Improve weather system thread safety (#22772)
Co-authored-by: Shauren <shauren.trinity@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -884,7 +884,6 @@ void World::SetInitialWorldSettings()
|
||||
stmt->SetData(2, GitRevision::GetFullVersion());
|
||||
LoginDatabase.Execute(stmt);
|
||||
|
||||
_timers[WUPDATE_WEATHERS].SetInterval(1 * IN_MILLISECONDS);
|
||||
_timers[WUPDATE_UPTIME].SetInterval(getIntConfig(CONFIG_UPTIME_UPDATE)*MINUTE * IN_MILLISECONDS);
|
||||
//Update "uptime" table based on configuration entry in minutes.
|
||||
|
||||
@@ -1186,13 +1185,6 @@ void World::Update(uint32 diff)
|
||||
sWorldSessionMgr->UpdateSessions(diff);
|
||||
}
|
||||
|
||||
/// <li> Handle weather updates when the timer has passed
|
||||
if (_timers[WUPDATE_WEATHERS].Passed())
|
||||
{
|
||||
_timers[WUPDATE_WEATHERS].Reset();
|
||||
WeatherMgr::Update(uint32(_timers[WUPDATE_WEATHERS].GetInterval()));
|
||||
}
|
||||
|
||||
/// <li> Clean logs table
|
||||
if (getIntConfig(CONFIG_LOGDB_CLEARTIME) > 0) // if not enabled, ignore the timer
|
||||
{
|
||||
|
||||
@@ -58,7 +58,6 @@ enum ShutdownExitCode : uint8
|
||||
/// Timers for different object refresh rates
|
||||
enum WorldTimers
|
||||
{
|
||||
WUPDATE_WEATHERS,
|
||||
WUPDATE_UPTIME,
|
||||
WUPDATE_EVENTS,
|
||||
WUPDATE_CLEANDB,
|
||||
|
||||
Reference in New Issue
Block a user