public override List <PhaseData> GetPhases(ParsedLog log, bool requirePhases) { long fightDuration = log.FightData.FightDuration; List <PhaseData> phases = GetInitialPhase(log); Target mainTarget = Targets.Find(x => x.ID == (ushort)ParseEnum.TargetIDS.Matthias); if (mainTarget == null) { throw new InvalidOperationException("Main target of the fight not found"); } phases[0].Targets.Add(mainTarget); if (!requirePhases) { return(phases); } // Special buff cast check CombatItem heatWave = log.GetBoonData(34526).FirstOrDefault(); if (heatWave != null) { phases.Add(new PhaseData(0, log.FightData.ToFightSpace(heatWave.Time) - 1)); CombatItem downPour = log.GetDamageData(mainTarget.InstID, mainTarget.FirstAware, mainTarget.LastAware).Find(x => x.SkillID == 34554); if (downPour != null) { phases.Add(new PhaseData(log.FightData.ToFightSpace(heatWave.Time), log.FightData.ToFightSpace(downPour.Time) - 1)); List <CastLog> castLogs = mainTarget.GetCastLogs(log, 0, log.FightData.FightEnd); CastLog abo = castLogs.Find(x => x.SkillId == 34427); if (abo != null) { phases.Add(new PhaseData(log.FightData.ToFightSpace(downPour.Time), abo.Time - 1)); CombatItem invulRemove = log.GetBoonDataByDst(mainTarget.InstID, log.FightData.ToLogSpace(abo.Time), log.FightData.ToLogSpace(abo.Time) + 10000).FirstOrDefault(x => x.SkillID == 757 && x.IsBuffRemove != ParseEnum.BuffRemove.None); if (invulRemove != null) { phases.Add(new PhaseData(log.FightData.ToFightSpace(invulRemove.Time), fightDuration)); } } else { phases.Add(new PhaseData(log.FightData.ToFightSpace(downPour.Time), fightDuration)); } } else { phases.Add(new PhaseData(log.FightData.ToFightSpace(heatWave.Time), fightDuration)); } } else { phases.Add(new PhaseData(0, fightDuration)); } string[] namesMat = new [] { "Ice Phase", "Fire Phase", "Storm Phase", "Abomination Phase" }; for (int i = 1; i < phases.Count; i++) { phases[i].Name = namesMat[i - 1]; phases[i].DrawStart = i > 1; phases[i].Targets.Add(mainTarget); } return(phases); }
protected override void SetDamageLogs(ParsedLog log) { foreach (CombatItem c in log.GetDamageData(InstID, FirstAware, LastAware)) { long time = log.FightData.ToFightSpace(c.Time); AddDamageLog(time, c); } }
public override List <PhaseData> GetPhases(ParsedLog log, bool requirePhases) { long start = 0; long end = 0; long fightDuration = log.FightData.FightDuration; List <PhaseData> phases = GetInitialPhase(log); Boss mainTarget = Targets.Find(x => x.ID == (ushort)ParseEnum.BossIDS.Matthias); if (mainTarget == null) { throw new InvalidOperationException("Main target of the fight not found"); } phases[0].Targets.Add(mainTarget); if (!requirePhases) { return(phases); } // Special buff cast check CombatItem heatWave = log.GetBoonData(34526).FirstOrDefault(); List <long> phaseStarts = new List <long>(); if (heatWave != null) { phaseStarts.Add(heatWave.Time - log.FightData.FightStart); CombatItem downPour = log.GetDamageData(mainTarget.InstID).Find(x => x.SkillID == 34554); if (downPour != null) { phaseStarts.Add(downPour.Time - log.FightData.FightStart); List <CastLog> castLogs = mainTarget.GetCastLogs(log, 0, log.FightData.FightEnd); CastLog abo = castLogs.Find(x => x.SkillId == 34427); if (abo != null) { phaseStarts.Add(abo.Time); } } } foreach (long t in phaseStarts) { end = t; phases.Add(new PhaseData(start, end)); // make sure stuff from the precedent phase mix witch each other start = t + 1; } if (fightDuration - start > 5000 && start >= phases.Last().End) { phases.Add(new PhaseData(start, fightDuration)); } string[] namesMat = new [] { "Ice Phase", "Fire Phase", "Storm Phase", "Abomination Phase" }; for (int i = 1; i < phases.Count; i++) { phases[i].Name = namesMat[i - 1]; phases[i].DrawStart = i > 1; phases[i].Targets.Add(mainTarget); } return(phases); }
protected override void SetDamageLogs(ParsedLog log) { long minTime = Math.Max(log.FightData.FightStart, AgentItem.FirstAware); long maxTime = Math.Min(log.FightData.FightEnd, AgentItem.LastAware); foreach (CombatItem c in log.GetDamageData(AgentItem.InstID)) { if (c.Time >= minTime && c.Time <= maxTime)//selecting minion as caster { long time = log.FightData.ToFightSpace(c.Time); AddDamageLog(time, c); } } }
protected override void SetDamageLogs(ParsedLog log) { foreach (CombatItem c in log.GetDamageData(InstID, FirstAware, LastAware)) { long time = log.FightData.ToFightSpace(c.Time); AddDamageLog(time, c); } Dictionary <string, Minions> minionsList = GetMinions(log); foreach (Minions mins in minionsList.Values) { DamageLogs.AddRange(mins.GetDamageLogs(null, log, log.FightData.ToFightSpace(FirstAware), log.FightData.ToFightSpace(LastAware))); } DamageLogs.Sort((x, y) => x.Time.CompareTo(y.Time)); }
protected override void SetDamageLogs(ParsedLog log) { foreach (CombatItem c in log.GetDamageData(AgentItem.InstID)) { if (c.Time >= FirstAware && c.Time <= LastAware)//selecting player or minion as caster { long time = log.FightData.ToFightSpace(c.Time); AddDamageLog(time, c); } } Dictionary <string, Minions> minionsList = GetMinions(log); foreach (Minions mins in minionsList.Values) { DamageLogs.AddRange(mins.GetDamageLogs(null, log, log.FightData.ToFightSpace(FirstAware), log.FightData.ToFightSpace(LastAware))); } DamageLogs.Sort((x, y) => x.Time < y.Time ? -1 : 1); }
protected override void SetDamageLogs(ParsedLog log) { long agentStart = Math.Max(FirstAware, log.FightData.FightStart); long agentEnd = Math.Min(LastAware, log.FightData.FightEnd); long timeStart = log.FightData.FightStart; foreach (CombatItem c in log.GetDamageData(AgentItem.InstID)) { if (c.Time > agentStart && c.Time < agentEnd)//selecting player or minion as caster { long time = c.Time - timeStart; AddDamageLog(time, c); } } Dictionary <string, Minions> minionsList = GetMinions(log); foreach (Minions mins in minionsList.Values) { DamageLogs.AddRange(mins.GetDamageLogs(null, log, 0, log.FightData.FightDuration)); } DamageLogs.Sort((x, y) => x.Time < y.Time ? -1 : 1); }