![]() |
TrinityCore
|
Files | |
| file | Weather.cpp |
| file | Weather.h |
| file | WeatherMgr.cpp |
| file | WeatherMgr.h |
| file | World.cpp |
| file | World.h |
Namespaces | |
| namespace | WeatherMgr |
Classes | |
| struct | WeatherSeasonChances |
| struct | WeatherData |
| class | Weather |
| Weather for one zone. More... | |
| struct | CliCommandHolder |
| Storage class for commands issued for delayed execution. More... | |
| class | World |
| The World. More... | |
Macros | |
| #define | WEATHER_SEASONS 4 |
| #define | sWorld World::instance() |
Typedefs | |
| typedef std::unordered_map< uint32, WorldSession * > | SessionMap |
Functions | |
| Weather::Weather (Map *map, uint32 zoneId, WeatherData const *weatherChances) | |
| Create the Weather object. | |
| Weather::~Weather () | |
| bool | Weather::Update (uint32 diff) |
| Launch a weather update. | |
| bool | Weather::ReGenerate () |
| Calculate the new weather. | |
| bool | Weather::UpdateWeather () |
| Send the new weather to all players in the zone. | |
| void | Weather::SendWeatherUpdateToPlayer (Player *player) |
| static void | Weather::SendFineWeatherUpdateToPlayer (Player *player) |
| void | Weather::SetWeather (WeatherType type, float intensity) |
| Set the weather. | |
| WeatherState | Weather::GetWeatherState () const |
| Get the sound number associated with the current weather. | |
| uint32 | Weather::GetZone () const |
| For which zone is this weather? | |
| uint32 | Weather::GetScriptId () const |
| void | WeatherMgr::LoadWeatherData () |
| WeatherData const * | WeatherMgr::GetWeatherData (uint32 zone_id) |
| TC_GAME_API uint32 | GetVirtualRealmAddress () |
| #define sWorld World::instance() |
| typedef std::unordered_map<uint32, WorldSession*> SessionMap |
Server rates.
| enum ServerMessageType |
| enum ShutdownExitCode : uint32 |
| enum ShutdownMask : uint32 |
| enum WeatherState : uint32 |
| enum WorldBoolConfigs : uint32 |
Configuration elements.
| enum WorldFloatConfigs : uint32 |
| enum WorldInt64Configs : uint32 |
| enum WorldIntConfigs : uint32 |
| enum WorldTimers |
Timers for different object refresh rates.
|
inline |
Definition at line 84 of file Weather.h.
Referenced by ScriptMgr::OnWeatherChange(), and ScriptMgr::OnWeatherUpdate().
| TC_GAME_API uint32 GetVirtualRealmAddress | ( | ) |
Definition at line 3500 of file World.cpp.
References sRealmList.
Referenced by Guild::AddMember(), WorldPackets::Character::EnumCharactersResult::CharacterInfoBasic::CharacterInfoBasic(), Guild::HandleInviteMember(), WorldSession::HandlePlayerLogin(), Guild::HandleQuery(), WorldSession::HandleQueryRealmName(), Guild::HandleRoster(), WorldSession::HandleWhoOpcode(), WorldPackets::Chat::Chat::Initialize(), WorldPackets::Query::PlayerGuidLookupData::Initialize(), WorldSession::SendAvailableHotfixes(), WorldSession::SendConnectToInstance(), Guild::SendEventNewLeader(), Guild::SendEventPlayerLeft(), SocialMgr::SendFriendStatus(), Spell::SendResurrectRequest(), PlayerSocial::SendSocialList(), and Player::SendSummonRequestFrom().
| TC_GAME_API WeatherData const * WeatherMgr::GetWeatherData | ( | uint32 | zone_id | ) |
Definition at line 38 of file WeatherMgr.cpp.
References Trinity::Containers::MapGetValuePtr().
Referenced by Map::GetOrGenerateZoneDefaultWeather().
| WeatherState Weather::GetWeatherState | ( | ) | const |
Get the sound number associated with the current weather.
Definition at line 286 of file Weather.cpp.
References Weather::m_intensity, Weather::m_type, WEATHER_STATE_BLACKRAIN, WEATHER_STATE_FINE, WEATHER_STATE_HEAVY_RAIN, WEATHER_STATE_HEAVY_SANDSTORM, WEATHER_STATE_HEAVY_SNOW, WEATHER_STATE_LIGHT_RAIN, WEATHER_STATE_LIGHT_SANDSTORM, WEATHER_STATE_LIGHT_SNOW, WEATHER_STATE_MEDIUM_RAIN, WEATHER_STATE_MEDIUM_SANDSTORM, WEATHER_STATE_MEDIUM_SNOW, WEATHER_STATE_THUNDERS, WEATHER_TYPE_BLACKRAIN, WEATHER_TYPE_FINE, WEATHER_TYPE_RAIN, WEATHER_TYPE_SNOW, WEATHER_TYPE_STORM, and WEATHER_TYPE_THUNDERS.
Referenced by Weather::SendWeatherUpdateToPlayer(), and Weather::UpdateWeather().
|
inline |
| TC_GAME_API void WeatherMgr::LoadWeatherData | ( | ) |
Definition at line 43 of file WeatherMgr.cpp.
References WeatherData::data, getMSTime(), GetMSTimeDiffToNow(), Field::GetUInt32(), MAX_WEATHER_TYPE, WeatherSeasonChances::rainChance, WeatherData::ScriptId, WeatherSeasonChances::snowChance, sObjectMgr, WeatherSeasonChances::stormChance, TC_LOG_ERROR, TC_LOG_INFO, WEATHER_SEASONS, and WorldDatabase.
Referenced by World::SetInitialWorldSettings().
| bool Weather::ReGenerate | ( | ) |
Calculate the new weather.
Weather statistics:
Radical change:
New weather statistics (if not fine):
Definition at line 70 of file Weather.cpp.
References WeatherData::data, GameTime::GetGameTime(), Weather::m_intensity, Weather::m_type, Weather::m_weatherChances, Weather::m_zone, WeatherSeasonChances::rainChance, rand_norm(), WeatherSeasonChances::snowChance, WeatherSeasonChances::stormChance, TC_LOG_INFO, urand(), WEATHER_SEASONS, WEATHER_TYPE_FINE, WEATHER_TYPE_RAIN, WEATHER_TYPE_SNOW, and WEATHER_TYPE_STORM.
Referenced by Weather::Update().
|
static |
Definition at line 200 of file Weather.cpp.
References Player::SendDirectMessage(), WEATHER_STATE_FINE, and WorldPackets::Misc::Weather::Write().
Referenced by Map::SendZoneWeather().
| void Weather::SendWeatherUpdateToPlayer | ( | Player * | player | ) |
Definition at line 194 of file Weather.cpp.
References Weather::GetWeatherState(), Weather::m_intensity, Player::SendDirectMessage(), and WorldPackets::Misc::Weather::Write().
| void Weather::SetWeather | ( | WeatherType | type, |
| float | intensity | ||
| ) |
Set the weather.
Definition at line 275 of file Weather.cpp.
References Weather::m_intensity, Weather::m_type, and Weather::UpdateWeather().
Referenced by misc_commandscript::HandleChangeWeather().
| bool Weather::Update | ( | uint32 | diff | ) |
Launch a weather update.
Definition at line 45 of file Weather.cpp.
References IntervalTimer::GetCurrent(), Weather::m_timer, IntervalTimer::Passed(), Weather::ReGenerate(), IntervalTimer::Reset(), IntervalTimer::SetCurrent(), sScriptMgr, IntervalTimer::Update(), and Weather::UpdateWeather().
| bool Weather::UpdateWeather | ( | ) |
Send the new weather to all players in the zone.
Definition at line 207 of file Weather.cpp.
References Weather::GetWeatherState(), Weather::m_intensity, Weather::m_map, Weather::m_zone, Map::SendZoneMessage(), sScriptMgr, TC_LOG_INFO, WEATHER_STATE_BLACKRAIN, WEATHER_STATE_FINE, WEATHER_STATE_FOG, WEATHER_STATE_HEAVY_RAIN, WEATHER_STATE_HEAVY_SANDSTORM, WEATHER_STATE_HEAVY_SNOW, WEATHER_STATE_LIGHT_RAIN, WEATHER_STATE_LIGHT_SANDSTORM, WEATHER_STATE_LIGHT_SNOW, WEATHER_STATE_MEDIUM_RAIN, WEATHER_STATE_MEDIUM_SANDSTORM, WEATHER_STATE_MEDIUM_SNOW, WEATHER_STATE_THUNDERS, and WorldPackets::Misc::Weather::Write().
Referenced by Weather::SetWeather(), and Weather::Update().
| Weather::Weather | ( | Map * | map, |
| uint32 | zoneId, | ||
| WeatherData const * | weatherChances | ||
| ) |
Create the Weather object.
Definition at line 34 of file Weather.cpp.
References CONFIG_INTERVAL_CHANGEWEATHER, IntervalTimer::GetInterval(), IN_MILLISECONDS, Weather::m_intensity, Weather::m_timer, Weather::m_type, Weather::m_zone, MINUTE, IntervalTimer::SetInterval(), sWorld, TC_LOG_INFO, and WEATHER_TYPE_FINE.
| WeatherSeasonChances WeatherData::data[WEATHER_SEASONS] |
Definition at line 42 of file Weather.h.
Referenced by WeatherMgr::LoadWeatherData(), and Weather::ReGenerate().
|
private |
Definition at line 90 of file Weather.h.
Referenced by Weather::GetWeatherState(), Weather::ReGenerate(), Weather::SendWeatherUpdateToPlayer(), Weather::SetWeather(), Weather::UpdateWeather(), and Weather::Weather().
|
private |
Definition at line 87 of file Weather.h.
Referenced by Weather::UpdateWeather().
|
private |
Definition at line 91 of file Weather.h.
Referenced by Weather::Update(), and Weather::Weather().
|
private |
Definition at line 89 of file Weather.h.
Referenced by Weather::GetWeatherState(), Weather::ReGenerate(), Weather::SetWeather(), and Weather::Weather().
|
private |
Definition at line 92 of file Weather.h.
Referenced by Weather::ReGenerate().
|
private |
Definition at line 88 of file Weather.h.
Referenced by Weather::ReGenerate(), Weather::UpdateWeather(), and Weather::Weather().
| uint32 WeatherSeasonChances::rainChance |
Definition at line 35 of file Weather.h.
Referenced by WeatherMgr::LoadWeatherData(), and Weather::ReGenerate().
| uint32 WeatherData::ScriptId |
Definition at line 43 of file Weather.h.
Referenced by WeatherMgr::LoadWeatherData().
| uint32 WeatherSeasonChances::snowChance |
Definition at line 36 of file Weather.h.
Referenced by WeatherMgr::LoadWeatherData(), and Weather::ReGenerate().
| uint32 WeatherSeasonChances::stormChance |
Definition at line 37 of file Weather.h.
Referenced by WeatherMgr::LoadWeatherData(), and Weather::ReGenerate().