public void AddEndTime(DateTime time) { var dun = DungeonRunTimes.FirstOrDefault(x => x.EndTime == null); if (dun != null && dun.StartTime < time) { dun.EndTime = time; SetCombatTimeSpan(); } }
public void AddStartTime(DateTime time) { if (DungeonRunTimes.Any(x => x.EndTime == null)) { var dun = DungeonRunTimes.FirstOrDefault(x => x.EndTime == null); if (dun != null) { dun.EndTime = time; DungeonRunTimes.Add(new TimeCollectObject(time)); } } else { DungeonRunTimes.Add(new TimeCollectObject(time)); } SetCombatTimeSpan(); }