Core/Weather: Move static function to WeatherMgr.
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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?
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user