Beispiel #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);
        }
Beispiel #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);
        }
        public static List <MechanicChartDataDto> BuildMechanicsChartData(ParsedEvtcLog log)
        {
            var mechanicsChart = new List <MechanicChartDataDto>();

            foreach (Mechanic mech in log.MechanicData.GetPresentMechanics(log, log.FightData.FightStart, log.FightData.FightEnd))
            {
                IReadOnlyList <MechanicEvent> mechanicLogs = log.MechanicData.GetMechanicLogs(log, mech);
                var dto = new MechanicChartDataDto
                {
                    Color   = mech.PlotlySetting.Color,
                    Symbol  = mech.PlotlySetting.Symbol,
                    Size    = mech.PlotlySetting.Size,
                    Visible = (mech.SkillId == SkillItem.DeathId || mech.SkillId == SkillItem.DownId),
                    Points  = BuildMechanicGraphPointData(log, mechanicLogs, mech.IsEnemyMechanic)
                };
                mechanicsChart.Add(dto);
            }
            return(mechanicsChart);
        }