Core/WeatherMgr: singleton converted to namespace with free functions. Note how RAII saves your life and removes the need in explicit delete :)

This commit is contained in:
Spp
2011-09-28 11:38:56 +02:00
parent cc06c41887
commit b93067350c
5 changed files with 52 additions and 70 deletions
+2 -2
View File
@@ -2372,10 +2372,10 @@ bool ChatHandler::HandleChangeWeather(const char *args)
Player* player = m_session->GetPlayer();
uint32 zoneid = player->GetZoneId();
Weather* wth = sWeatherMgr->FindWeather(zoneid);
Weather* wth = WeatherMgr::FindWeather(zoneid);
if (!wth)
wth = sWeatherMgr->AddWeather(zoneid);
wth = WeatherMgr::AddWeather(zoneid);
if (!wth)
{
SendSysMessage(LANG_NO_WEATHER);