コード例 #1
0
 private static void BuildBoonGraphData(List <BuffChartDataDto> list, IReadOnlyList <Buff> listToUse, Dictionary <long, BuffsGraphModel> boonGraphData, PhaseData phase, Dictionary <long, Buff> usedBuffs)
 {
     foreach (Buff buff in listToUse)
     {
         if (boonGraphData.TryGetValue(buff.ID, out BuffsGraphModel bgm))
         {
             BuffChartDataDto graph = BuildBuffGraph(bgm, phase, usedBuffs);
             if (graph != null)
             {
                 list.Add(graph);
             }
         }
         boonGraphData.Remove(buff.ID);
     }
 }
コード例 #2
0
        public static List <BuffChartDataDto> BuildBoonGraphData(ParsedEvtcLog log, AbstractSingleActor p, PhaseData phase, Dictionary <long, Buff> usedBuffs)
        {
            var list          = new List <BuffChartDataDto>();
            var boonGraphData = p.GetBuffGraphs(log).ToDictionary(x => x.Key, x => x.Value);

            BuildBoonGraphData(list, log.StatisticsHelper.PresentBoons, boonGraphData, phase, usedBuffs);
            BuildBoonGraphData(list, log.StatisticsHelper.PresentConditions, boonGraphData, phase, usedBuffs);
            BuildBoonGraphData(list, log.StatisticsHelper.PresentOffbuffs, boonGraphData, phase, usedBuffs);
            BuildBoonGraphData(list, log.StatisticsHelper.PresentSupbuffs, boonGraphData, phase, usedBuffs);
            BuildBoonGraphData(list, log.StatisticsHelper.PresentDefbuffs, boonGraphData, phase, usedBuffs);
            BuildBoonGraphData(list, log.StatisticsHelper.PresentDebuffs, boonGraphData, phase, usedBuffs);
            BuildBoonGraphData(list, log.StatisticsHelper.PresentGearbuffs, boonGraphData, phase, usedBuffs);
            foreach (BuffsGraphModel bgm in boonGraphData.Values)
            {
                BuffChartDataDto graph = BuildBuffGraph(bgm, phase, usedBuffs);
                if (graph != null)
                {
                    list.Add(graph);
                }
            }
            if (p.GetType() == typeof(Player))
            {
                foreach (AbstractSingleActor mainTarget in log.FightData.GetMainTargets(log))
                {
                    boonGraphData = mainTarget.GetBuffGraphs(log);
                    foreach (BuffsGraphModel bgm in boonGraphData.Values.Reverse().Where(x => x.Buff.Name == "Compromised" || x.Buff.Name == "Unnatural Signet" || x.Buff.Name == "Fractured - Enemy" || x.Buff.Name == "Erratic Energy"))
                    {
                        BuffChartDataDto graph = BuildBuffGraph(bgm, phase, usedBuffs);
                        if (graph != null)
                        {
                            list.Add(graph);
                        }
                    }
                }
            }
            list.Reverse();
            return(list);
        }