public static List <PlayerChartDataDto> BuildPlayersGraphData(ParsedEvtcLog log, int phaseIndex)
        {
            var       list  = new List <PlayerChartDataDto>();
            PhaseData phase = log.FightData.GetPhases(log)[phaseIndex];

            foreach (Player p in log.PlayerList)
            {
                var pChar = new PlayerChartDataDto()
                {
                    Damage = new PlayerDamageChartDto <int>()
                    {
                        Total   = p.Get1SDamageList(log, phase.Start, phase.End, null),
                        Targets = new List <IReadOnlyList <int> >()
                    },
                    BreakbarDamage = new PlayerDamageChartDto <double>()
                    {
                        Total   = p.Get1SBreakbarDamageList(log, phase.Start, phase.End, null),
                        Targets = new List <IReadOnlyList <double> >()
                    },
                    HealthStates  = ChartDataDto.BuildHealthStates(log, p, phase, true),
                    BarrierStates = ChartDataDto.BuildBarrierStates(log, p, phase)
                };
                foreach (NPC target in phase.Targets)
                {
                    pChar.Damage.Targets.Add(p.Get1SDamageList(log, phase.Start, phase.End, target));
                    pChar.BreakbarDamage.Targets.Add(p.Get1SBreakbarDamageList(log, phase.Start, phase.End, target));
                }
                list.Add(pChar);
            }
            return(list);
        }
        public static TargetChartDataDto BuildTargetGraphData(ParsedEvtcLog log, int phaseIndex, NPC target)
        {
            PhaseData phase = log.FightData.GetPhases(log)[phaseIndex];

            return(new TargetChartDataDto
            {
                Total = target.Get1SDamageList(log, phase.Start, phase.End, null),
                HealthStates = ChartDataDto.BuildHealthStates(log, target, phase, false),
                BreakbarPercentStates = ChartDataDto.BuildBreakbarPercentStates(log, target, phase),
                BarrierStates = ChartDataDto.BuildBarrierStates(log, target, phase),
            });
        }
 public PhaseChartDataDto(ParsedEvtcLog log, PhaseData phase, bool addCRData)
 {
     Players = PlayerChartDataDto.BuildPlayersGraphData(log, phase);
     foreach (AbstractSingleActor target in phase.Targets)
     {
         Targets.Add(new TargetChartDataDto(log, phase, target));
     }
     if (addCRData)
     {
         TargetsHealthStatesForCR          = new List <List <object[]> >();
         TargetsBreakbarPercentStatesForCR = new List <List <object[]> >();
         TargetsBarrierStatesForCR         = new List <List <object[]> >();
         foreach (AbstractSingleActor target in log.FightData.Logic.Targets)
         {
             TargetsHealthStatesForCR.Add(ChartDataDto.BuildHealthStates(log, target, phase, false));
             TargetsBreakbarPercentStatesForCR.Add(ChartDataDto.BuildBreakbarPercentStates(log, target, phase));
             TargetsBarrierStatesForCR.Add(ChartDataDto.BuildBarrierStates(log, target, phase));
         }
     }
 }
 public ActorChartDataDto(ParsedEvtcLog log, PhaseData phase, AbstractSingleActor actor, bool nullableHPStates)
 {
     HealthStates  = ChartDataDto.BuildHealthStates(log, actor, phase, nullableHPStates);
     BarrierStates = ChartDataDto.BuildBarrierStates(log, actor, phase);
 }