internal override List <PhaseData> GetPhases(ParsedEvtcLog log, bool requirePhases) { List <PhaseData> phases = GetInitialPhase(log); AbstractSingleActor ankka = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.Ankka); if (ankka == null) { throw new MissingKeyActorsException("Ankka not found"); } phases[0].AddTarget(ankka); if (!requirePhases) { return(phases); } List <PhaseData> subPhases = GetPhasesByInvul(log, AnkkaPlateformChanging, ankka, false, true); for (int i = 0; i < subPhases.Count; i++) { subPhases[i].Name = "Location " + (i + 1); subPhases[i].AddTarget(ankka); } phases.AddRange(subPhases); List <PhaseData> subSubPhases = GetPhasesByInvul(log, Determined895, ankka, false, false); subSubPhases.RemoveAll(x => subPhases.Any(y => Math.Abs(y.Start - x.Start) < ParserHelper.ServerDelayConstant && Math.Abs(y.End - x.End) < ParserHelper.ServerDelayConstant)); int curSubSubPhaseID = 0; PhaseData previousSubPhase = null; for (int i = 0; i < subSubPhases.Count; i++) { PhaseData subsubPhase = subSubPhases[i]; PhaseData subPhase = subPhases.FirstOrDefault(x => x.Start - ParserHelper.ServerDelayConstant <= subsubPhase.Start && x.End + ParserHelper.ServerDelayConstant >= subsubPhase.End); if (previousSubPhase != subPhase) { previousSubPhase = subPhase; curSubSubPhaseID = 0; } if (subPhase != null) { int index = subPhases.IndexOf(subPhase); subsubPhase.OverrideStart(Math.Max(subsubPhase.Start, subPhase.Start)); subsubPhase.OverrideEnd(Math.Min(subsubPhase.End, subPhase.End)); subsubPhase.Name = "Location " + (index + 1) + " - " + (++curSubSubPhaseID); subsubPhase.AddTarget(ankka); } } phases.AddRange(subSubPhases); // return(phases); }