internal void Update(RawRepairDock rpRawData)
        {
            State = rpRawData.State;

            if (State == RepairDockState.Repairing)
            {
                Ship = KanColleGame.Current.Port.Ships[rpRawData.ShipID];
                TimeToComplete = DateTimeUtil.UnixEpoch.AddMilliseconds(rpRawData.TimeToComplete);
            }
            else
            {
                if (Ship != null)
                {
                    Ship.Repair(true);
                    Ship = null;
                }
                TimeToComplete = null;
            }
        }
Example #2
0
 void UpdateRepairDocks(RawRepairDock[] rpDocks)
 {
     if (RepairDocks.UpdateRawData(rpDocks, r => new RepairDock(r), (rpData, rpRawData) => rpData.Update(rpRawData)))
         OnPropertyChanged(nameof(RepairDocks));
 }
        internal RepairDock(RawRepairDock rpRawData)
        {
            ID = rpRawData.ID;

            Update(rpRawData);
        }