internal void Update(kcsapi_kdock[] source) { if (this.Docks.Count == source.Length) { foreach (var raw in source) this.Docks[raw.api_id]?.Update(raw); } else { foreach (var dock in this.Docks) dock.Value.SafeDispose(); this.Docks = new MemberTable<BuildingDock>(source.Select(x => new BuildingDock(x))); } }
private void Update(kcsapi_kdock[] source) { if (this.Docks.Count == source.Length) { foreach (var raw in source) { var target = this.Docks[raw.api_id]; if (target != null) target.Update(raw); } } else { this.Docks = new MemberTable<BuildingDock>(source.Select(x => new BuildingDock(x))); } }