Core/Weather: Weather updates are now sent to all players in the zone instead of the first player it finds in the zone and all players nearby.

Thanks to @Nawuko, @Magnifikator and @Shauren

Closes #11380
Fixes #11370
This commit is contained in:
Discover- committed 2014-01-21 09:44:48 +01:00
1 parent cde9717bd1
commit 32070669f4
5 files changed
+19 -23

No files matched your search

+3 -8
View File
@@ -7524,14 +7524,9 @@ void Player::UpdateZone(uint32 newZone, uint32 newArea)
{
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);
}
}
else if (!WeatherMgr::AddWeather(zone->ID))
// send fine weather packet to remove old zone's weather
WeatherMgr::SendFineWeatherUpdateToPlayer(this);
}
sScriptMgr->OnPlayerUpdateZone(this, newZone, newArea);