internal Fleet(Homeport parent, kcsapi_deck rawData) { this.homeport = parent; this.ReSortie = new FleetReSortie(); this.Expedition = new Expedition(this); this.Update(rawData); }
/// <summary> /// 指定した <see cref="kcsapi_deck"/> を使用して艦隊の情報をすべて更新します。 /// </summary> /// <param name="rawData">エンド ポイントから取得したデータ。</param> internal void Update(kcsapi_deck rawData) { this.Id = rawData.api_id; this.Name = rawData.api_name; this.Expedition.Update(rawData.api_mission); this.UpdateShips(rawData.api_ship.Select(id => this.homeport.Organization.Ships[id]).ToArray()); }
internal void Update(kcsapi_deck source) { var fleet = this.Fleets[source.api_id]; if (fleet != null) { fleet.Update(source); } }
internal void Update(kcsapi_deck rawData) { this.Id = rawData.api_id; this.Name = rawData.api_name; this.Ships = rawData.api_ship.Select(id => this.homeport.Ships[id]).Where(x => x != null).ToArray(); this.ReSortie.Update(this.Ships); this.Expedition.Update(rawData.api_mission); this.UpdateStatus(); }
internal Fleet(Homeport parent, kcsapi_deck rawData) { this.homeport = parent; this.State = new FleetState(parent, this); this.Expedition = new Expedition(this); this.CompositeDisposable.Add(this.State); this.CompositeDisposable.Add(this.Expedition); this.Update(rawData); }
internal void Update(kcsapi_deck rawData) { this.Id = rawData.api_id; this.Name = rawData.api_name; this.Ships = rawData.api_ship.Select(id => this.homeport.Ships[id]).Where(x => x != null).ToArray(); this.AverageLevel = this.Ships.HasValue() ? this.Ships.Average(s => s.Level) : 0.0; this.AirSuperiorityPotential = this.Ships.Sum(s => s.CalcAirSuperiorityPotential()); this.Speed = this.Ships.All(s => s.Info.Speed == Speed.Fast) ? Speed.Fast : Speed.Low; this.ReSortie.Update(this.Ships); this.Expedition.Update(rawData.api_mission); this.UpdateStatus(); }
internal Fleet(Homeport parent, kcsapi_deck rawData) { this.homeport = parent; this.Condition = new FleetCondition(this); this.Expedition = new Expedition(this); this.Update(rawData); this.compositeDisposable = new LivetCompositeDisposable { new PropertyChangedWeakEventListener(KanColleClient.Current.Settings) { { "ViewRangeCalcLogic", (sender, args) => this.Calculate() } } }; }
internal void Update(kcsapi_deck source) { this.Fleets[source.api_id]?.Update(source); }