diff options
| author | Takenbacon <revoke1336@live.com> | 2024-06-08 02:13:24 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-08 11:13:24 +0200 |
| commit | 70d6121ef47573555218ad072c425cfb74c29558 (patch) | |
| tree | 6f2fb1fe18a203244ed0a863f3859c54f196c4c7 /src/server/game/Weather/Weather.cpp | |
| parent | b0bf3c9de500fb585429432ad7cb634b225f2d49 (diff) | |
Core/Misc: Move zone packet sending from World to Map (#30024)
Diffstat (limited to 'src/server/game/Weather/Weather.cpp')
| -rw-r--r-- | src/server/game/Weather/Weather.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/server/game/Weather/Weather.cpp b/src/server/game/Weather/Weather.cpp index f9bfe072d8e..429f58b3395 100644 --- a/src/server/game/Weather/Weather.cpp +++ b/src/server/game/Weather/Weather.cpp @@ -22,6 +22,7 @@ #include "Weather.h" #include "GameTime.h" #include "Log.h" +#include "Map.h" #include "MiscPackets.h" #include "Player.h" #include "Random.h" @@ -30,8 +31,8 @@ #include "World.h" /// Create the Weather object -Weather::Weather(uint32 zoneId, WeatherData const* weatherChances) - : m_zone(zoneId), m_weatherChances(weatherChances) +Weather::Weather(Map* map, uint32 zoneId, WeatherData const* weatherChances) + : m_map(map), m_zone(zoneId), m_weatherChances(weatherChances) { m_timer.SetInterval(sWorld->getIntConfig(CONFIG_INTERVAL_CHANGEWEATHER)); m_type = WEATHER_TYPE_FINE; @@ -216,7 +217,7 @@ bool Weather::UpdateWeather() WorldPackets::Misc::Weather weather(state, m_intensity); //- Returns false if there were no players found to update - if (!sWorld->SendZoneMessage(m_zone, weather.Write())) + if (!m_map->SendZoneMessage(m_zone, weather.Write())) return false; ///- Log the event |
