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:
Takenbacon
2025-09-29 07:43:30 -07:00
committed by GitHub
parent 5f17121117
commit 22f93eaca6
20 changed files with 186 additions and 247 deletions

View File

@@ -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);