diff options
Diffstat (limited to 'src/server/game/Weather/Weather.cpp')
-rwxr-xr-x | src/server/game/Weather/Weather.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/server/game/Weather/Weather.cpp b/src/server/game/Weather/Weather.cpp index c35a9dbbf06..3e021a76f61 100755 --- a/src/server/game/Weather/Weather.cpp +++ b/src/server/game/Weather/Weather.cpp @@ -33,11 +33,11 @@ Weather::Weather(uint32 zone, WeatherData const* weatherChances) : m_zone(zone), m_weatherChances(weatherChances) { - m_timer.SetInterval(sWorld.getIntConfig(CONFIG_INTERVAL_CHANGEWEATHER)); + m_timer.SetInterval(sWorld->getIntConfig(CONFIG_INTERVAL_CHANGEWEATHER)); m_type = WEATHER_TYPE_FINE; m_grade = 0; - sLog.outDetail("WORLD: Starting weather system for zone %u (change every %u minutes).", m_zone, (uint32)(m_timer.GetInterval() / (MINUTE*IN_MILLISECONDS))); + sLog->outDetail("WORLD: Starting weather system for zone %u (change every %u minutes).", m_zone, (uint32)(m_timer.GetInterval() / (MINUTE*IN_MILLISECONDS))); } /// Launch a weather update @@ -91,13 +91,13 @@ bool Weather::ReGenerate() //78 days between January 1st and March 20nd; 365/4=91 days by season // season source http://aa.usno.navy.mil/data/docs/EarthSeasons.html - time_t gtime = sWorld.GetGameTime(); + time_t gtime = sWorld->GetGameTime(); struct tm * ltime = localtime(>ime); uint32 season = ((ltime->tm_yday - 78 + 365)/91)%4; static char const* seasonName[WEATHER_SEASONS] = { "spring", "summer", "fall", "winter" }; - sLog.outDebug("Generating a change in %s weather for zone %u.", seasonName[season], m_zone); + sLog->outDebug("Generating a change in %s weather for zone %u.", seasonName[season], m_zone); if ((u < 60) && (m_grade < 0.33333334f)) // Get fair { @@ -208,7 +208,7 @@ void Weather::SendFineWeatherUpdateToPlayer(Player *player) /// Send the new weather to all players in the zone bool Weather::UpdateWeather() { - Player* player = sWorld.FindPlayerInZone(m_zone); + Player* player = sWorld->FindPlayerInZone(m_zone); if (!player) return false; @@ -266,7 +266,7 @@ bool Weather::UpdateWeather() wthstr = "fine"; break; } - sLog.outDetail("Change the weather of zone %u to %s.", m_zone, wthstr); + sLog->outDetail("Change the weather of zone %u to %s.", m_zone, wthstr); sScriptMgr->OnWeatherChange(this, state, m_grade); return true; |