private void Update(kcsapi_ship_deck source) { if (source.api_ship_data != null) { foreach (var ship in source.api_ship_data) { var target = this.Ships[ship.api_id]; target.Update(ship); } } if (source.api_deck_data != null) { foreach (var deck in source.api_deck_data) { var target = this.Fleets[deck.api_id]; target.Update(deck); } } }
private void Update(kcsapi_ship_deck source) { if (source.api_ship_data != null) { foreach (var ship in source.api_ship_data) { var target = this.Ships[ship.api_id]; target.Update(ship); if (this.evacuatedShipsIds.Any(x => target.Id == x)) target.Situation |= ShipSituation.Evacuation; if (this.towShipIds.Any(x => target.Id == x)) target.Situation |= ShipSituation.Tow; } } if (source.api_deck_data != null) { foreach (var deck in source.api_deck_data) { var target = this.Fleets[deck.api_id]; target.Update(deck); } } }