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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user