Core/Conditions: Implemented missing PlayerCondition columns - time and weather
Port From (https://github.com/TrinityCore/TrinityCore/commit/8aaf750be1ee16a299016cf038bd84bd9b387544)
This commit is contained in:
@@ -3467,6 +3467,21 @@ namespace Game.Maps
|
||||
return info.DefaultWeather;
|
||||
}
|
||||
|
||||
public WeatherState GetZoneWeather(uint zoneId)
|
||||
{
|
||||
ZoneDynamicInfo zoneDynamicInfo = _zoneDynamicInfo.LookupByKey(zoneId);
|
||||
if (zoneDynamicInfo != null)
|
||||
{
|
||||
if (zoneDynamicInfo.WeatherId != 0)
|
||||
return zoneDynamicInfo.WeatherId;
|
||||
|
||||
if (zoneDynamicInfo.DefaultWeather != null)
|
||||
return zoneDynamicInfo.DefaultWeather.GetWeatherState();
|
||||
}
|
||||
|
||||
return WeatherState.Fine;
|
||||
}
|
||||
|
||||
public void SetZoneWeather(uint zoneId, WeatherState weatherId, float weatherGrade)
|
||||
{
|
||||
if (!_zoneDynamicInfo.ContainsKey(zoneId))
|
||||
|
||||
Reference in New Issue
Block a user