Core/Weather: Fixed weather updates to be thread safe

(cherry picked from commit 6eb9973947)
This commit is contained in:
Shauren
2017-09-14 22:33:40 +02:00
parent 9a9af3cc5f
commit 6eecb685ce
10 changed files with 88 additions and 120 deletions

View File

@@ -29,8 +29,6 @@
#include "ScriptMgr.h"
#include "Util.h"
#include "World.h"
#include "WorldPacket.h"
#include "WorldSession.h"
/// Create the Weather object
Weather::Weather(uint32 zone, WeatherData const* weatherChances)
@@ -199,6 +197,12 @@ void Weather::SendWeatherUpdateToPlayer(Player* player)
player->SendDirectMessage(weather.Write());
}
void Weather::SendFineWeatherUpdateToPlayer(Player* player)
{
WorldPackets::Misc::Weather weather(WEATHER_STATE_FINE);
player->SendDirectMessage(weather.Write());
}
/// Send the new weather to all players in the zone
bool Weather::UpdateWeather()
{