public void SetWeather(WeatherZone weatherZone, WeatherType type, float intensity) { weatherZone.CurrentWeather = type; weatherZone.Intensity = intensity; this.SendWeather(weatherZone); }
public void UpdateWeatherZone(WeatherZone weatherZone) { if (weatherZone.ChangeWeather()) { SendWeather(weatherZone); } }
private List <WorldSession> SessionsInWeatherZone(WeatherZone weatherZone) { var entityComponent = Core.GetComponent <EntityComponent>(); return ((from p in entityComponent.PlayerEntities.Where(pe => pe.Location.MapID == weatherZone.MapId) select p.Session).ToList()); }
public void SendWeather(WeatherZone weatherZone) { SessionsInWeatherZone(weatherZone).ForEach(s => s.SendPacket(new PSWeather(weatherZone))); }
private List<WorldSession> SessionsInWeatherZone(WeatherZone weatherZone) { var entityComponent = Core.GetComponent<EntityComponent>(); return (from p in entityComponent.PlayerEntities.Where(pe => pe.Location.MapID == weatherZone.MapId) select p.Session).ToList(); }
public void UpdateWeatherZone(WeatherZone weatherZone) { if(weatherZone.ChangeWeather()) SendWeather(weatherZone); }