Exemplo n.º 1
0
        internal static ChartDataDto BuildChartData(ParsedEvtcLog log)
        {
            var chartData           = new ChartDataDto();
            var phaseChartData      = new List <PhaseChartDataDto>();
            List <PhaseData> phases = log.FightData.GetPhases(log);

            for (int i = 0; i < phases.Count; i++)
            {
                var phaseData = new PhaseChartDataDto()
                {
                    Players = PlayerChartDataDto.BuildPlayersGraphData(log, i)
                };
                foreach (NPC target in phases[i].Targets)
                {
                    phaseData.Targets.Add(TargetChartDataDto.BuildTargetGraphData(log, i, target));
                }
                if (i == 0)
                {
                    phaseData.TargetsHealthStatesForCR          = new List <List <object[]> >();
                    phaseData.TargetsBreakbarPercentStatesForCR = new List <List <object[]> >();
                    foreach (NPC target in log.FightData.Logic.Targets)
                    {
                        phaseData.TargetsHealthStatesForCR.Add(BuildHealthGraphStates(log, target, phases[0], false));
                        phaseData.TargetsBreakbarPercentStatesForCR.Add(BuildBreakbarPercentStates(log, target, phases[0]));
                    }
                }

                phaseChartData.Add(phaseData);
            }
            chartData.Phases    = phaseChartData;
            chartData.Mechanics = MechanicChartDataDto.BuildMechanicsChartData(log);
            return(chartData);
        }
Exemplo n.º 2
0
        public ChartDataDto(ParsedEvtcLog log)
        {
            var phaseChartData = new List <PhaseChartDataDto>();
            IReadOnlyList <PhaseData> phases = log.FightData.GetPhases(log);

            for (int i = 0; i < phases.Count; i++)
            {
                phaseChartData.Add(new PhaseChartDataDto(log, phases[i], i == 0));
            }
            Phases    = phaseChartData;
            Mechanics = MechanicChartDataDto.BuildMechanicsChartData(log);
        }