aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Weather/Weather.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Weather/Weather.cpp')
-rw-r--r--src/server/game/Weather/Weather.cpp7
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