public void SetPhasePerTarget(Target target, List <PhaseData> phases, ParsedLog log) { long fightDuration = log.FightData.FightDuration; CombatItem phaseStart = log.GetStatesData(target.InstID, ParseEnum.StateChange.EnterCombat, target.FirstAware, target.LastAware).Where(x => x.SrcInstid == target.InstID).LastOrDefault(); if (phaseStart != null) { long start = log.FightData.ToFightSpace(phaseStart.Time); CombatItem phaseEnd = log.GetStatesData(target.InstID, ParseEnum.StateChange.ChangeDead, target.FirstAware, target.LastAware).Where(x => x.SrcInstid == target.InstID).LastOrDefault(); long end = fightDuration; if (phaseEnd != null) { end = log.FightData.ToFightSpace(phaseEnd.Time); } PhaseData phase = new PhaseData(start, end); phase.Targets.Add(target); phases.Add(phase); } }