Example #1
0
 public override IReadOnlyList <AbstractBreakbarDamageEvent> GetBreakbarDamageTakenEvents(AbstractSingleActor target, ParsedEvtcLog log, long start, long end)
 {
     if (BreakbarDamageTakenEvents == null)
     {
         BreakbarDamageTakenEvents = new List <AbstractBreakbarDamageEvent>();
         foreach (NPC minion in _minionList)
         {
             BreakbarDamageTakenEvents.AddRange(minion.GetBreakbarDamageTakenEvents(null, log, 0, log.FightData.FightEnd));
         }
         BreakbarDamageTakenEvents      = BreakbarDamageTakenEvents.OrderBy(x => x.Time).ToList();
         BreakbarDamageTakenEventsBySrc = BreakbarDamageTakenEvents.GroupBy(x => x.From).ToDictionary(x => x.Key, x => x.ToList());
     }
     if (target != null)
     {
         if (BreakbarDamageTakenEventsBySrc.TryGetValue(target.AgentItem, out List <AbstractBreakbarDamageEvent> list))
         {
             return(list.Where(x => x.Time >= start && x.Time <= end).ToList());
         }
         else
         {
             return(new List <AbstractBreakbarDamageEvent>());
         }
     }
     return(BreakbarDamageTakenEvents.Where(x => x.Time >= start && x.Time <= end).ToList());
 }
Example #2
0
 public override IReadOnlyList <AbstractBreakbarDamageEvent> GetBreakbarDamageTakenEvents(AbstractSingleActor target, ParsedEvtcLog log, long start, long end)
 {
     if (BreakbarDamageTakenEvents == null)
     {
         BreakbarDamageTakenEvents = new List <AbstractBreakbarDamageEvent>();
         BreakbarDamageTakenEvents.AddRange(log.CombatData.GetBreakbarDamageTakenData(AgentItem));
         BreakbarDamageTakenEvents      = BreakbarDamageTakenEvents.OrderBy(x => x.Time).ToList();
         BreakbarDamageTakenEventsBySrc = BreakbarDamageTakenEvents.GroupBy(x => x.From).ToDictionary(x => x.Key, x => x.ToList());
     }
     if (target != null)
     {
         if (BreakbarDamageTakenEventsBySrc.TryGetValue(target.AgentItem, out List <AbstractBreakbarDamageEvent> list))
         {
             long targetStart = target.FirstAware;
             long targetEnd   = target.LastAware;
             return(list.Where(x => x.Time >= start && x.Time >= targetStart && x.Time <= end && x.Time <= targetEnd).ToList());
         }
         else
         {
             return(new List <AbstractBreakbarDamageEvent>());
         }
     }
     return(BreakbarDamageTakenEvents.Where(x => x.Time >= start && x.Time <= end).ToList());
 }