Core/Weather: Move static function to WeatherMgr.

This commit is contained in:
Spp
2011-09-28 11:55:25 +02:00
parent d0ce7d2367
commit 71228f90bb
5 changed files with 11 additions and 10 deletions
+1 -1
View File
@@ -7434,7 +7434,7 @@ void Player::UpdateZone(uint32 newZone, uint32 newArea)
if (!WeatherMgr::AddWeather(zone->ID)) if (!WeatherMgr::AddWeather(zone->ID))
{ {
// send fine weather packet to remove old zone's weather // send fine weather packet to remove old zone's weather
Weather::SendFineWeatherUpdateToPlayer(this); WeatherMgr::SendFineWeatherUpdateToPlayer(this);
} }
} }
} }
-8
View File
@@ -197,14 +197,6 @@ void Weather::SendWeatherUpdateToPlayer(Player* player)
player->GetSession()->SendPacket(&data); player->GetSession()->SendPacket(&data);
} }
void Weather::SendFineWeatherUpdateToPlayer(Player* player)
{
WorldPacket data(SMSG_WEATHER, (4+4+4));
data << (uint32)WEATHER_STATE_FINE << (float)0.0f << uint8(0);
player->GetSession()->SendPacket(&data);
}
/// Send the new weather to all players in the zone /// Send the new weather to all players in the zone
bool Weather::UpdateWeather() bool Weather::UpdateWeather()
{ {
-1
View File
@@ -73,7 +73,6 @@ class Weather
bool UpdateWeather(); bool UpdateWeather();
void SendWeatherUpdateToPlayer(Player* player); void SendWeatherUpdateToPlayer(Player* player);
static void SendFineWeatherUpdateToPlayer(Player* player);
void SetWeather(WeatherType type, float grade); void SetWeather(WeatherType type, float grade);
/// For which zone is this weather? /// For which zone is this weather?
+8
View File
@@ -141,6 +141,14 @@ void LoadWeatherData()
sLog->outString(); sLog->outString();
} }
void SendFineWeatherUpdateToPlayer(Player* player)
{
WorldPacket data(SMSG_WEATHER, (4+4+4));
data << (uint32)WEATHER_STATE_FINE << (float)0.0f << uint8(0);
player->GetSession()->SendPacket(&data);
}
void Update(uint32 diff) void Update(uint32 diff)
{ {
///- Send an update signal to Weather objects ///- Send an update signal to Weather objects
+2
View File
@@ -36,6 +36,8 @@ namespace WeatherMgr
Weather* AddWeather(uint32 zone_id); Weather* AddWeather(uint32 zone_id);
void RemoveWeather(uint32 zone_id); void RemoveWeather(uint32 zone_id);
void SendFineWeatherUpdateToPlayer(Player* player);
void Update(uint32 diff); void Update(uint32 diff);
} }