Beispiel #1
0
 public override IReadOnlyList <EXTAbstractBarrierEvent> GetIncomingBarrierEvents(AbstractSingleActor target, ParsedEvtcLog log, long start, long end)
 {
     if (!log.CombatData.HasEXTBarrier)
     {
         throw new InvalidOperationException("Healing Stats extension not present");
     }
     if (BarrierReceivedEvents == null)
     {
         BarrierReceivedEvents = new List <EXTAbstractBarrierEvent>();
         BarrierReceivedEvents.AddRange(log.CombatData.EXTBarrierCombatData.GetBarrierReceivedData(_agentItem).Where(x => x.ToFriendly));
         BarrierReceivedEvents      = BarrierReceivedEvents.OrderBy(x => x.Time).ToList();
         BarrierReceivedEventsBySrc = BarrierReceivedEvents.GroupBy(x => x.From).ToDictionary(x => x.Key, x => x.ToList());
     }
     if (target != null)
     {
         if (BarrierReceivedEventsBySrc.TryGetValue(target.AgentItem, out List <EXTAbstractBarrierEvent> list))
         {
             return(list.Where(x => x.Time >= start && x.Time <= end).ToList());
         }
         else
         {
             return(new List <EXTAbstractBarrierEvent>());
         }
     }
     return(BarrierReceivedEvents.Where(x => x.Time >= start && x.Time <= end).ToList());
 }
 public override IReadOnlyList <EXTAbstractBarrierEvent> GetIncomingBarrierEvents(AbstractSingleActor target, ParsedEvtcLog log, long start, long end)
 {
     if (BarrierReceivedEvents == null)
     {
         BarrierReceivedEvents = new List <EXTAbstractBarrierEvent>();
         foreach (NPC minion in _minionList)
         {
             BarrierReceivedEvents.AddRange(minion.EXTBarrier.GetIncomingBarrierEvents(null, log, 0, log.FightData.FightEnd));
         }
         BarrierReceivedEvents      = BarrierReceivedEvents.OrderBy(x => x.Time).ToList();
         BarrierReceivedEventsBySrc = BarrierReceivedEvents.GroupBy(x => x.From).ToDictionary(x => x.Key, x => x.ToList());
     }
     if (target != null)
     {
         if (BarrierReceivedEventsBySrc.TryGetValue(target.AgentItem, out List <EXTAbstractBarrierEvent> list))
         {
             return(list.Where(x => x.Time >= start && x.Time <= end).ToList());
         }
         else
         {
             return(new List <EXTAbstractBarrierEvent>());
         }
     }
     return(BarrierReceivedEvents.Where(x => x.Time >= start && x.Time <= end).ToList());
 }