diff options
| author | Shauren <none@none> | 2010-12-23 23:25:44 +0100 |
|---|---|---|
| committer | Shauren <none@none> | 2010-12-23 23:25:44 +0100 |
| commit | 928443d8993869dfbf3adceabe4ba0b3cfe0edef (patch) | |
| tree | b30f1385e6f2dd8d95357590593aa2988b094593 /src/server/game/Weather | |
| parent | 95daf7998fc3b772fdcd70087c12db80bd5a031a (diff) | |
Core: Removed more operator workarounds for ACE_Singleton (missed previously because of inconsistent naming)
--HG--
branch : trunk
Diffstat (limited to 'src/server/game/Weather')
| -rwxr-xr-x | src/server/game/Weather/Weather.cpp | 12 | ||||
| -rwxr-xr-x | src/server/game/Weather/WeatherMgr.cpp | 14 |
2 files changed, 13 insertions, 13 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; diff --git a/src/server/game/Weather/WeatherMgr.cpp b/src/server/game/Weather/WeatherMgr.cpp index 0108c2dcc35..107219c9591 100755 --- a/src/server/game/Weather/WeatherMgr.cpp +++ b/src/server/game/Weather/WeatherMgr.cpp @@ -84,8 +84,8 @@ void WeatherMgr::LoadWeatherData() if (!result) { - sLog.outErrorDb(">> Loaded 0 weather definitions. DB table `game_weather` is empty."); - sLog.outString(); + sLog->outErrorDb(">> Loaded 0 weather definitions. DB table `game_weather` is empty."); + sLog->outString(); return; } @@ -107,19 +107,19 @@ void WeatherMgr::LoadWeatherData() if (wzc.data[season].rainChance > 100) { wzc.data[season].rainChance = 25; - sLog.outErrorDb("Weather for zone %u season %u has wrong rain chance > 100%%",zone_id,season); + sLog->outErrorDb("Weather for zone %u season %u has wrong rain chance > 100%%",zone_id,season); } if (wzc.data[season].snowChance > 100) { wzc.data[season].snowChance = 25; - sLog.outErrorDb("Weather for zone %u season %u has wrong snow chance > 100%%",zone_id,season); + sLog->outErrorDb("Weather for zone %u season %u has wrong snow chance > 100%%",zone_id,season); } if (wzc.data[season].stormChance > 100) { wzc.data[season].stormChance = 25; - sLog.outErrorDb("Weather for zone %u season %u has wrong storm chance > 100%%",zone_id,season); + sLog->outErrorDb("Weather for zone %u season %u has wrong storm chance > 100%%",zone_id,season); } } @@ -129,8 +129,8 @@ void WeatherMgr::LoadWeatherData() } while (result->NextRow()); - sLog.outString(">> Loaded %u weather definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog.outString(); + sLog->outString(">> Loaded %u weather definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outString(); } void WeatherMgr::Update(uint32 diff) |
