protected override void SetDamageLogs(ParsedLog log) { AddDamageLogs(log.CombatData.GetDamageData(AgentItem)); 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.CompareTo(y.Time)); }
protected override void SetDamageLogs(ParsedLog log) { foreach (CombatItem c in log.CombatData.GetDamageData(InstID, FirstAware, LastAware)) { long time = log.FightData.ToFightSpace(c.Time); AddDamageLog(time, c, log.Boons); } 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)); }
public override List <AbstractDamageEvent> GetDamageLogs(AbstractActor target, ParsedLog log, long start, long end) { if (DamageLogs == null) { DamageLogs = new List <AbstractDamageEvent>(); foreach (NPC minion in MinionList) { DamageLogs.AddRange(minion.GetDamageLogs(null, log, 0, log.FightData.FightEnd)); } DamageLogsByDst = DamageLogs.GroupBy(x => x.To).ToDictionary(x => x.Key, x => x.ToList()); } if (target != null && DamageLogsByDst.TryGetValue(target.AgentItem, out List <AbstractDamageEvent> list)) { return(list.Where(x => x.Time >= start && x.Time <= end).ToList()); } return(DamageLogs.Where(x => x.Time >= start && x.Time <= end).ToList()); }
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); }