* Move weather management to new WeatherMgr (yes, I care that much about the weather - I really do).

--HG--
branch : trunk
This commit is contained in:
XTZGZoReX
2010-08-08 05:06:13 +02:00
parent 18dce8897f
commit e03c873bcf
8 changed files with 238 additions and 152 deletions
+3 -2
View File
@@ -68,6 +68,7 @@
#include "SpellAuraEffects.h"
#include "ConditionMgr.h"
#include "DisableMgr.h"
#include "WeatherMgr.h"
#include <cmath>
#define ZONE_UPDATE_INTERVAL (1*IN_MILLISECONDS)
@@ -6965,12 +6966,12 @@ void Player::UpdateZone(uint32 newZone, uint32 newArea)
if (sWorld.getConfig(CONFIG_WEATHER))
{
Weather *wth = sWorld.FindWeather(zone->ID);
Weather *wth = sWeatherMgr.FindWeather(zone->ID);
if (wth)
wth->SendWeatherUpdateToPlayer(this);
else
{
if (!sWorld.AddWeather(zone->ID))
if (!sWeatherMgr.AddWeather(zone->ID))
{
// send fine weather packet to remove old zone's weather
Weather::SendFineWeatherUpdateToPlayer(this);