Core/Weather: Fixed weather updates to be thread safe

(cherry picked from commit 6eb9973947)
This commit is contained in:
Shauren
2017-09-14 22:33:40 +02:00
parent 9a9af3cc5f
commit 6eecb685ce
10 changed files with 88 additions and 120 deletions

View File

@@ -1401,10 +1401,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);