public IReadOnlyList <int> Get1SBarrierList(ParsedEvtcLog log, long start, long end, AbstractSingleActor target) { if (_barrier1S == null) { _barrier1S = new CachingCollectionWithTarget <int[]>(log); } if (!_barrier1S.TryGetValue(start, end, target, out int[] graph))
public IReadOnlyList <EXTAbstractHealingEvent> GetTypedOutgoingHealEvents(AbstractSingleActor target, ParsedEvtcLog log, long start, long end, EXTHealingType healingType) { if (!_typedHealEvents.TryGetValue(healingType, out CachingCollectionWithTarget <List <EXTAbstractHealingEvent> > healEventsPerPhasePerTarget)) { healEventsPerPhasePerTarget = new CachingCollectionWithTarget <List <EXTAbstractHealingEvent> >(log); _typedHealEvents[healingType] = healEventsPerPhasePerTarget; } if (!healEventsPerPhasePerTarget.TryGetValue(start, end, target, out List <EXTAbstractHealingEvent> dls)) { dls = GetOutgoingHealEvents(target, log, start, end).ToList(); switch (healingType) { case EXTHealingType.HealingPower: dls.RemoveAll(x => x.GetHealingType(log) != EXTHealingType.HealingPower); break; case EXTHealingType.ConversionBased: dls.RemoveAll(x => x.GetHealingType(log) != EXTHealingType.ConversionBased); break; case EXTHealingType.Hybrid: dls.RemoveAll(x => x.GetHealingType(log) != EXTHealingType.Hybrid); break; case EXTHealingType.All: break; default: throw new NotImplementedException("Not implemented healing type " + healingType); } healEventsPerPhasePerTarget.Set(start, end, target, dls); } return(dls); }
public IReadOnlyList <int> Get1SDamageList(ParsedEvtcLog log, long start, long end, AbstractSingleActor target, ParserHelper.DamageType damageType = ParserHelper.DamageType.All) { if (!_damageList1S.TryGetValue(damageType, out CachingCollectionWithTarget <int[]> graphs)) { graphs = new CachingCollectionWithTarget <int[]>(log); _damageList1S[damageType] = graphs; } if (!graphs.TryGetValue(start, end, target, out int[] graph))
public IReadOnlyList <int> Get1SHealingList(ParsedEvtcLog log, long start, long end, AbstractSingleActor target, EXTHealingType healingType = EXTHealingType.All) { if (!_healing1S.TryGetValue(healingType, out CachingCollectionWithTarget <int[]> graphs)) { graphs = new CachingCollectionWithTarget <int[]>(log); _healing1S[healingType] = graphs; } if (!graphs.TryGetValue(start, end, target, out int[] graph))
internal IReadOnlyList <AbstractHealthDamageEvent> GetConditionHitDamageEvents(AbstractActor target, ParsedEvtcLog log, long start, long end) { if (_conditionHitDamageEventsPerPhasePerTarget == null) { _conditionHitDamageEventsPerPhasePerTarget = new CachingCollectionWithTarget <List <AbstractHealthDamageEvent> >(log); } if (!_conditionHitDamageEventsPerPhasePerTarget.TryGetValue(start, end, target, out List <AbstractHealthDamageEvent> dls)) { dls = GetHitDamageEvents(target, log, start, end).Where(x => x.ConditionDamageBased(log)).ToList(); _conditionHitDamageEventsPerPhasePerTarget.Set(start, end, target, dls); } return(dls); }
public FinalSupport GetSupportStats(AbstractSingleActor target, ParsedEvtcLog log, long start, long end) { if (_supportStats == null) { _supportStats = new CachingCollectionWithTarget <FinalSupport>(log); } if (!_supportStats.TryGetValue(start, end, target, out FinalSupport value)) { value = target != null ? new FinalSupport(log, start, end, this, target) : new FinalSupportAll(log, start, end, this); _supportStats.Set(start, end, target, value); } return(value); }
public FinalGameplayStats GetGameplayStats(AbstractSingleActor target, ParsedEvtcLog log, long start, long end) { if (_gameplayStats == null) { _gameplayStats = new CachingCollectionWithTarget <FinalGameplayStats>(log); } if (!_gameplayStats.TryGetValue(start, end, target, out FinalGameplayStats value)) { value = target != null ? new FinalGameplayStats(log, start, end, this, target) : new FinalGameplayStatsAll(log, start, end, this); _gameplayStats.Set(start, end, target, value); } return(value); }
// DPS Stats public FinalDPS GetDPSStats(AbstractSingleActor target, ParsedEvtcLog log, long start, long end) { if (_dpsStats == null) { _dpsStats = new CachingCollectionWithTarget <FinalDPS>(log); } if (!_dpsStats.TryGetValue(start, end, target, out FinalDPS value)) { value = new FinalDPS(log, start, end, this, target); _dpsStats.Set(start, end, target, value); } return(value); }
public FinalOffensiveStats GetOffensiveStats(AbstractSingleActor target, ParsedEvtcLog log, long start, long end) { if (_offensiveStats == null) { _offensiveStats = new CachingCollectionWithTarget <FinalOffensiveStats>(log); } if (!_offensiveStats.TryGetValue(start, end, target, out FinalOffensiveStats value)) { value = new FinalOffensiveStats(log, start, end, this, target); _offensiveStats.Set(start, end, target, value); } return(value); }
internal IReadOnlyList <EXTAbstractHealingEvent> GetJustActorTypedOutgoingHealEvents(AbstractSingleActor target, ParsedEvtcLog log, long start, long end, EXTHealingType healingType) { if (!_typedSelfHealEvents.TryGetValue(healingType, out CachingCollectionWithTarget <List <EXTAbstractHealingEvent> > healEventsPerPhasePerTarget)) { healEventsPerPhasePerTarget = new CachingCollectionWithTarget <List <EXTAbstractHealingEvent> >(log); _typedSelfHealEvents[healingType] = healEventsPerPhasePerTarget; } if (!healEventsPerPhasePerTarget.TryGetValue(start, end, target, out List <EXTAbstractHealingEvent> dls)) { dls = GetTypedOutgoingHealEvents(target, log, start, end, healingType).Where(x => x.From == _agentItem).ToList(); healEventsPerPhasePerTarget.Set(start, end, target, dls); } return(dls); }
/// <summary> /// cached method for damage modifiers /// </summary> internal IReadOnlyList <AbstractHealthDamageEvent> GetJustActorHitDamageEvents(AbstractSingleActor target, ParsedEvtcLog log, long start, long end, ParserHelper.DamageType damageType) { if (!_typedSelfHitDamageEvents.TryGetValue(damageType, out CachingCollectionWithTarget <List <AbstractHealthDamageEvent> > hitDamageEventsPerPhasePerTarget)) { hitDamageEventsPerPhasePerTarget = new CachingCollectionWithTarget <List <AbstractHealthDamageEvent> >(log); _typedSelfHitDamageEvents[damageType] = hitDamageEventsPerPhasePerTarget; } if (!hitDamageEventsPerPhasePerTarget.TryGetValue(start, end, target, out List <AbstractHealthDamageEvent> dls)) { dls = GetHitDamageEvents(target, log, start, end, damageType).Where(x => x.From == AgentItem).ToList(); hitDamageEventsPerPhasePerTarget.Set(start, end, target, dls); } return(dls); }
public IReadOnlyList <AbstractHealthDamageEvent> GetHitDamageEvents(AbstractSingleActor target, ParsedEvtcLog log, long start, long end, ParserHelper.DamageType damageType) { if (!_typedHitDamageEvents.TryGetValue(damageType, out CachingCollectionWithTarget <List <AbstractHealthDamageEvent> > hitDamageEventsPerPhasePerTarget)) { hitDamageEventsPerPhasePerTarget = new CachingCollectionWithTarget <List <AbstractHealthDamageEvent> >(log); _typedHitDamageEvents[damageType] = hitDamageEventsPerPhasePerTarget; } if (!hitDamageEventsPerPhasePerTarget.TryGetValue(start, end, target, out List <AbstractHealthDamageEvent> dls)) { dls = GetDamageEvents(target, log, start, end).Where(x => x.HasHit).ToList(); switch (damageType) { case ParserHelper.DamageType.Power: dls.RemoveAll(x => x.ConditionDamageBased(log)); break; case ParserHelper.DamageType.Strike: dls.RemoveAll(x => x is NonDirectHealthDamageEvent); break; case ParserHelper.DamageType.Condition: dls.RemoveAll(x => !x.ConditionDamageBased(log)); break; case ParserHelper.DamageType.StrikeAndCondition: dls.RemoveAll(x => x is NonDirectHealthDamageEvent && !x.ConditionDamageBased(log)); break; case ParserHelper.DamageType.StrikeAndConditionAndLifeLeech: dls.RemoveAll(x => x is NonDirectHealthDamageEvent ndhd && !x.ConditionDamageBased(log) && !ndhd.IsLifeLeech); break; case ParserHelper.DamageType.All: break; default: throw new NotImplementedException("Not implemented damage type " + damageType); } hitDamageEventsPerPhasePerTarget.Set(start, end, target, dls); } return(dls); }
public IReadOnlyDictionary <string, DamageModifierStat> GetDamageModifierStats(AbstractSingleActor target, ParsedEvtcLog log, long start, long end) { if (!log.ParserSettings.ComputeDamageModifiers || Actor.IsFakeActor) { return(new Dictionary <string, DamageModifierStat>()); } if (_damageModifiersPerTargets == null) { _damageModifiersPerTargets = new CachingCollectionWithTarget <Dictionary <string, DamageModifierStat> >(log); _damageModifierEventsPerTargets = new CachingCollectionWithTarget <Dictionary <string, List <DamageModifierEvent> > >(log); } if (_damageModifiersPerTargets.TryGetValue(start, end, target, out Dictionary <string, DamageModifierStat> res)) { return(res); } res = ComputeDamageModifierStats(target, log, start, end); if (res != null) { return(res); } // var damageMods = new List <DamageModifier>(); if (log.DamageModifiers.DamageModifiersPerSource.TryGetValue(Source.Item, out IReadOnlyList <DamageModifier> list)) { damageMods.AddRange(list); } if (log.DamageModifiers.DamageModifiersPerSource.TryGetValue(Source.Gear, out list)) { damageMods.AddRange(list); } if (log.DamageModifiers.DamageModifiersPerSource.TryGetValue(Source.Common, out list)) { damageMods.AddRange(list); } if (log.DamageModifiers.DamageModifiersPerSource.TryGetValue(Source.FightSpecific, out list)) { damageMods.AddRange(list); } damageMods.AddRange(log.DamageModifiers.GetModifiersPerSpec(Actor.Spec)); // var damageModifierEvents = new List <DamageModifierEvent>(); foreach (DamageModifier damageMod in damageMods) { damageModifierEvents.AddRange(damageMod.ComputeDamageModifier(Actor, log)); } damageModifierEvents.Sort((x, y) => x.Time.CompareTo(y.Time)); var damageModifiersEvents = damageModifierEvents.GroupBy(y => y.DamageModifier.Name).ToDictionary(y => y.Key, y => y.ToList()); _damageModifierEventsPerTargets.Set(0, log.FightData.FightEnd, null, damageModifiersEvents); var damageModifiersEventsByTarget = damageModifierEvents.GroupBy(x => x.Dst).ToDictionary(x => x.Key, x => x.GroupBy(y => y.DamageModifier.Name).ToDictionary(y => y.Key, y => y.ToList())); foreach (AgentItem actor in damageModifiersEventsByTarget.Keys) { _damageModifierEventsPerTargets.Set(0, log.FightData.FightEnd, log.FindActor(actor), damageModifiersEventsByTarget[actor]); } // res = ComputeDamageModifierStats(target, log, start, end); return(res); }