mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 10:00:28 +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:
@@ -1895,13 +1895,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->SendErrorMessage(LANG_NO_WEATHER);
|
||||
|
||||
Reference in New Issue
Block a user