Core/Weather: Fixed weather updates to be thread safe

This commit is contained in:
Shauren
2017-09-14 22:33:40 +02:00
parent 6d2bc7abf4
commit 6eb9973947
11 changed files with 103 additions and 146 deletions

View File

@@ -1496,10 +1496,7 @@ public:
Player* player = handler->GetSession()->GetPlayer();
uint32 zoneid = player->GetZoneId();
Weather* weather = WeatherMgr::FindWeather(zoneid);
if (!weather)
weather = WeatherMgr::AddWeather(zoneid);
Weather* weather = player->GetMap()->GetOrGenerateZoneDefaultWeather(zoneid);
if (!weather)
{
handler->SendSysMessage(LANG_NO_WEATHER);