mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-31 09:33:47 +00:00
fix(Core/Weather): Improve weather system thread safety (#22772)
Co-authored-by: Shauren <shauren.trinity@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -1289,13 +1289,9 @@ void Player::UpdateZone(uint32 newZone, uint32 newArea, bool force)
|
||||
return;
|
||||
|
||||
if (sWorld->getBoolConfig(CONFIG_WEATHER))
|
||||
{
|
||||
if (Weather* weather = WeatherMgr::FindWeather(zone->ID))
|
||||
weather->SendWeatherUpdateToPlayer(this);
|
||||
else if (!WeatherMgr::AddWeather(zone->ID))
|
||||
// send fine weather packet to remove old zone's weather
|
||||
WeatherMgr::SendFineWeatherUpdateToPlayer(this);
|
||||
}
|
||||
GetMap()->GetOrGenerateZoneDefaultWeather(newZone);
|
||||
|
||||
GetMap()->SendZoneDynamicInfo(newZone, this);
|
||||
|
||||
sScriptMgr->OnPlayerUpdateZone(this, newZone, newArea);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user