mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 16:38:42 +01:00
Core/Weather: Fixed weather updates to be thread safe
(cherry picked from commit 6eb9973947)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user