Weather system fixed

Fixed by implementing the cmangos Cata commit
[c13018] Improve Weather handling
and comparing their code with the current system.

Thanks,. cmangos :-)
This commit is contained in:
Charles A Edwards 2016-08-28 11:11:03 +01:00 committed by Antz
parent 3b52b46199
commit 6db0ba8ae9
12 changed files with 55 additions and 93 deletions

View file

@ -411,50 +411,6 @@ bool World::RemoveQueuedSession(WorldSession* sess)
return found;
}
/// Find a Weather object by the given zoneid
Weather* World::FindWeather(uint32 id) const
{
WeatherMap::const_iterator itr = m_weathers.find(id);
if (itr != m_weathers.end())
return itr->second;
else
return 0;
}
/// Remove a Weather object for the given zoneid
void World::RemoveWeather(uint32 id)
{
// not called at the moment. Kept for completeness
WeatherMap::iterator itr = m_weathers.find(id);
if (itr != m_weathers.end())
{
delete itr->second;
m_weathers.erase(itr);
}
}
/// Add a Weather object to the list
/*
* chucky - delete this?
* this is not in Two
Weather* World::AddWeather(uint32 zone_id)
{
WeatherZoneChances const* weatherChances = sObjectMgr.GetWeatherChances(zone_id);
// zone not have weather, ignore
if (!weatherChances)
return NULL;
Weather* w = new Weather(zone_id, weatherChances);
m_weathers[w->GetZone()] = w;
w->ReGenerate();
w->UpdateWeather();
return w;
}
*/
/// Initialize config values
void World::LoadConfigSettings(bool reload)
{