Exemple #1
0
        // helpers

        public static ActorDetailsDto BuildPlayerData(ParsedEvtcLog log, AbstractSingleActor actor, Dictionary <long, SkillItem> usedSkills, Dictionary <long, Buff> usedBuffs)
        {
            var dto = new ActorDetailsDto
            {
                DmgDistributions        = new List <DmgDistributionDto>(),
                DmgDistributionsTargets = new List <List <DmgDistributionDto> >(),
                DmgDistributionsTaken   = new List <DmgDistributionDto>(),
                BoonGraph  = new List <List <BuffChartDataDto> >(),
                Rotation   = new List <List <object[]> >(),
                Food       = FoodDto.BuildFoodData(log, actor, usedBuffs),
                Minions    = new List <ActorDetailsDto>(),
                DeathRecap = DeathRecapDto.BuildDeathRecap(log, actor)
            };

            foreach (PhaseData phase in log.FightData.GetPhases(log))
            {
                dto.Rotation.Add(SkillDto.BuildRotationData(log, actor, phase, usedSkills));
                dto.DmgDistributions.Add(DmgDistributionDto.BuildFriendlyDMGDistData(log, actor, null, phase, usedSkills, usedBuffs));
                var dmgTargetsDto = new List <DmgDistributionDto>();
                foreach (AbstractSingleActor target in phase.Targets)
                {
                    dmgTargetsDto.Add(DmgDistributionDto.BuildFriendlyDMGDistData(log, actor, target, phase, usedSkills, usedBuffs));
                }
                dto.DmgDistributionsTargets.Add(dmgTargetsDto);
                dto.DmgDistributionsTaken.Add(DmgDistributionDto.BuildDMGTakenDistData(log, actor, phase, usedSkills, usedBuffs));
                dto.BoonGraph.Add(BuffChartDataDto.BuildBoonGraphData(log, actor, phase, usedBuffs));
            }
            foreach (KeyValuePair <long, Minions> pair in actor.GetMinions(log))
            {
                dto.Minions.Add(BuildFriendlyMinionsData(log, actor, pair.Value, usedSkills, usedBuffs));
            }

            return(dto);
        }
Exemple #2
0
        // helpers

        internal static ActorDetailsDto BuildPlayerData(ParsedEvtcLog log, Player player, Dictionary <long, SkillItem> usedSkills, Dictionary <long, Buff> usedBuffs)
        {
            var dto = new ActorDetailsDto
            {
                DmgDistributions        = new List <DmgDistributionDto>(),
                DmgDistributionsTargets = new List <List <DmgDistributionDto> >(),
                DmgDistributionsTaken   = new List <DmgDistributionDto>(),
                BoonGraph  = new List <List <BuffChartDataDto> >(),
                Rotation   = new List <List <object[]> >(),
                Food       = FoodDto.BuildPlayerFoodData(log, player, usedBuffs),
                Minions    = new List <ActorDetailsDto>(),
                DeathRecap = DeathRecapDto.BuildDeathRecap(log, player)
            };

            for (int i = 0; i < log.FightData.GetPhases(log).Count; i++)
            {
                dto.Rotation.Add(SkillDto.BuildRotationData(log, player, i, usedSkills));
                dto.DmgDistributions.Add(DmgDistributionDto.BuildPlayerDMGDistData(log, player, null, i, usedSkills, usedBuffs));
                var dmgTargetsDto = new List <DmgDistributionDto>();
                foreach (NPC target in log.FightData.GetPhases(log)[i].Targets)
                {
                    dmgTargetsDto.Add(DmgDistributionDto.BuildPlayerDMGDistData(log, player, target, i, usedSkills, usedBuffs));
                }
                dto.DmgDistributionsTargets.Add(dmgTargetsDto);
                dto.DmgDistributionsTaken.Add(DmgDistributionDto.BuildDMGTakenDistData(log, player, i, usedSkills, usedBuffs));
                dto.BoonGraph.Add(BuffChartDataDto.BuildBoonGraphData(log, player, i, usedBuffs));
            }
            foreach (KeyValuePair <long, Minions> pair in player.GetMinions(log))
            {
                dto.Minions.Add(BuildPlayerMinionsData(log, player, pair.Value, usedSkills, usedBuffs));
            }

            return(dto);
        }
 public PlayerDto(Player player, ParsedEvtcLog log, ActorDetailsDto details) : base(player, log, details)
 {
     Group       = player.Group;
     Acc         = player.Account;
     Profession  = player.Prof;
     IsPoV       = log.LogData.PoV == player.AgentItem;
     IsCommander = player.HasCommanderTag;
     ColTarget   = HTMLBuilder.GetLink("Color-" + player.Prof);
     ColCleave   = HTMLBuilder.GetLink("Color-" + player.Prof + "-NonBoss");
     ColTotal    = HTMLBuilder.GetLink("Color-" + player.Prof + "-Total");
     IsDummy     = player.IsDummyActor;
     IsCustom    = player.IsCustomActor;
     BuildWeaponSets(player, log);
 }
Exemple #4
0
 public PlayerDto(AbstractSingleActor actor, ParsedEvtcLog log, ActorDetailsDto details) : base(actor, log, details)
 {
     Group       = actor.Group;
     Acc         = actor.Account;
     Profession  = actor.Spec.ToString();
     IsPoV       = log.LogData.PoV == actor.AgentItem;
     IsCommander = actor.HasCommanderTag;
     ColTarget   = HTMLBuilder.GetLink("Color-" + actor.Spec.ToString());
     ColCleave   = HTMLBuilder.GetLink("Color-" + actor.Spec.ToString() + "-NonBoss");
     ColTotal    = HTMLBuilder.GetLink("Color-" + actor.Spec.ToString() + "-Total");
     IsFake      = actor.IsFakeActor;
     NotInSquad  = !(actor is Player);
     BuildWeaponSets(actor, log);
 }
 protected ActorDto(AbstractSingleActor actor, ParsedEvtcLog log, ActorDetailsDto details)
 {
     Name     = actor.Character;
     Tough    = actor.Toughness;
     Details  = details;
     UniqueID = actor.UniqueID;
     foreach (KeyValuePair <long, Minions> pair in actor.GetMinions(log))
     {
         Minions.Add(new MinionDto()
         {
             Id   = pair.Key,
             Name = pair.Value.Character
         });
     }
 }
Exemple #6
0
        public static ActorDetailsDto BuildTargetData(ParsedEvtcLog log, AbstractSingleActor target, Dictionary <long, SkillItem> usedSkills, Dictionary <long, Buff> usedBuffs, bool cr)
        {
            var dto = new ActorDetailsDto
            {
                DmgDistributions      = new List <DmgDistributionDto>(),
                DmgDistributionsTaken = new List <DmgDistributionDto>(),
                BoonGraph             = new List <List <BuffChartDataDto> >(),
                Rotation = new List <List <object[]> >()
            };
            IReadOnlyList <PhaseData> phases = log.FightData.GetPhases(log);

            for (int i = 0; i < phases.Count; i++)
            {
                PhaseData phase = phases[i];
                if (phase.Targets.Contains(target))
                {
                    dto.DmgDistributions.Add(DmgDistributionDto.BuildTargetDMGDistData(log, target, phase, usedSkills, usedBuffs));
                    dto.DmgDistributionsTaken.Add(DmgDistributionDto.BuildDMGTakenDistData(log, target, phase, usedSkills, usedBuffs));
                    dto.Rotation.Add(SkillDto.BuildRotationData(log, target, phase, usedSkills));
                    dto.BoonGraph.Add(BuffChartDataDto.BuildBoonGraphData(log, target, phase, usedBuffs));
                }
                // rotation + buff graph for CR
                else if (i == 0 && cr)
                {
                    dto.DmgDistributions.Add(new DmgDistributionDto());
                    dto.DmgDistributionsTaken.Add(new DmgDistributionDto());
                    dto.Rotation.Add(SkillDto.BuildRotationData(log, target, phase, usedSkills));
                    dto.BoonGraph.Add(BuffChartDataDto.BuildBoonGraphData(log, target, phase, usedBuffs));
                }
                else
                {
                    dto.DmgDistributions.Add(new DmgDistributionDto());
                    dto.DmgDistributionsTaken.Add(new DmgDistributionDto());
                    dto.Rotation.Add(new List <object[]>());
                    dto.BoonGraph.Add(new List <BuffChartDataDto>());
                }
            }

            dto.Minions = new List <ActorDetailsDto>();
            foreach (KeyValuePair <long, Minions> pair in target.GetMinions(log))
            {
                dto.Minions.Add(BuildTargetsMinionsData(log, target, pair.Value, usedSkills, usedBuffs));
            }
            return(dto);
        }
Exemple #7
0
        private static ActorDetailsDto BuildTargetsMinionsData(ParsedEvtcLog log, NPC target, Minions minion, Dictionary <long, SkillItem> usedSkills, Dictionary <long, Buff> usedBuffs)
        {
            var dto = new ActorDetailsDto
            {
                DmgDistributions = new List <DmgDistributionDto>()
            };

            for (int i = 0; i < log.FightData.GetPhases(log).Count; i++)
            {
                if (log.FightData.GetPhases(log)[i].Targets.Contains(target))
                {
                    dto.DmgDistributions.Add(DmgDistributionDto.BuildTargetMinionDMGDistData(log, target, minion, i, usedSkills, usedBuffs));
                }
                else
                {
                    dto.DmgDistributions.Add(new DmgDistributionDto());
                }
            }
            return(dto);
        }
Exemple #8
0
 protected ActorDto(AbstractSingleActor actor, ParsedEvtcLog log, ActorDetailsDto details)
 {
     Health   = actor.GetHealth(log.CombatData);
     Condi    = actor.Condition;
     Conc     = actor.Concentration;
     Heal     = actor.Healing;
     Icon     = actor.GetIcon();
     Name     = actor.Character;
     Tough    = actor.Toughness;
     Details  = details;
     UniqueID = actor.UniqueID;
     foreach (KeyValuePair <long, Minions> pair in actor.GetMinions(log))
     {
         Minions.Add(new MinionDto()
         {
             Id   = pair.Key,
             Name = pair.Value.Character
         });
     }
 }
Exemple #9
0
 internal TargetDto(NPC target, ParsedEvtcLog log, bool cr, ActorDetailsDto details) : base(target, log, cr, details)
 {
     Icon     = target.GetIcon();
     Health   = target.GetHealth(log.CombatData);
     HbHeight = target.HitboxHeight;
     HbWidth  = target.HitboxWidth;
     if (log.FightData.Success)
     {
         HpLeft = 0;
     }
     else
     {
         List <HealthUpdateEvent> hpUpdates = log.CombatData.GetHealthUpdateEvents(target.AgentItem);
         if (hpUpdates.Count > 0)
         {
             HpLeft = hpUpdates.Last().HPPercent;
         }
     }
     Percent = Math.Round(100.0 - HpLeft, 2);
 }
Exemple #10
0
        private static ActorDetailsDto BuildFriendlyMinionsData(ParsedEvtcLog log, AbstractSingleActor actor, Minions minion, Dictionary <long, SkillItem> usedSkills, Dictionary <long, Buff> usedBuffs)
        {
            var dto = new ActorDetailsDto
            {
                DmgDistributions        = new List <DmgDistributionDto>(),
                DmgDistributionsTargets = new List <List <DmgDistributionDto> >()
            };

            foreach (PhaseData phase in log.FightData.GetPhases(log))
            {
                var dmgTargetsDto = new List <DmgDistributionDto>();
                foreach (AbstractSingleActor target in phase.Targets)
                {
                    dmgTargetsDto.Add(DmgDistributionDto.BuildFriendlyMinionDMGDistData(log, actor, minion, target, phase, usedSkills, usedBuffs));
                }
                dto.DmgDistributionsTargets.Add(dmgTargetsDto);
                dto.DmgDistributions.Add(DmgDistributionDto.BuildFriendlyMinionDMGDistData(log, actor, minion, null, phase, usedSkills, usedBuffs));
            }
            return(dto);
        }
Exemple #11
0
        private static ActorDetailsDto BuildTargetsMinionsData(ParsedEvtcLog log, AbstractSingleActor target, Minions minion, Dictionary <long, SkillItem> usedSkills, Dictionary <long, Buff> usedBuffs)
        {
            var dto = new ActorDetailsDto
            {
                DmgDistributions = new List <DmgDistributionDto>()
            };

            foreach (PhaseData phase in log.FightData.GetPhases(log))
            {
                if (phase.Targets.Contains(target))
                {
                    dto.DmgDistributions.Add(DmgDistributionDto.BuildTargetMinionDMGDistData(log, target, minion, phase, usedSkills, usedBuffs));
                }
                else
                {
                    dto.DmgDistributions.Add(new DmgDistributionDto());
                }
            }
            return(dto);
        }
Exemple #12
0
        public static LogDataDto BuildLogData(ParsedEvtcLog log, bool cr, bool light, Version parserVersion, string[] uploadLinks)
        {
            var usedBuffs      = new Dictionary <long, Buff>();
            var usedDamageMods = new HashSet <DamageModifier>();
            var usedSkills     = new Dictionary <long, SkillItem>();

            log.UpdateProgressWithCancellationCheck("HTML: building Log Data");
            var logData = new LogDataDto(log, light, parserVersion, uploadLinks);

            if (cr)
            {
                log.UpdateProgressWithCancellationCheck("HTML: building Combat Replay");
                logData.CrData = new CombatReplayDto(log);
            }
            log.UpdateProgressWithCancellationCheck("HTML: building Graph Data");
            logData.GraphData = new ChartDataDto(log);
            log.UpdateProgressWithCancellationCheck("HTML: building Players");
            foreach (AbstractSingleActor actor in log.Friendlies)
            {
                logData.HasCommander = logData.HasCommander || actor.HasCommanderTag;
                logData.Players.Add(new PlayerDto(actor, log, ActorDetailsDto.BuildPlayerData(log, actor, usedSkills, usedBuffs)));
            }

            log.UpdateProgressWithCancellationCheck("HTML: building Enemies");
            foreach (AbstractSingleActor enemy in log.MechanicData.GetEnemyList(log, 0, log.FightData.FightEnd))
            {
                logData.Enemies.Add(new EnemyDto()
                {
                    Name = enemy.Character
                });
            }

            log.UpdateProgressWithCancellationCheck("HTML: building Targets");
            foreach (AbstractSingleActor target in log.FightData.Logic.Targets)
            {
                var targetDto = new TargetDto(target, log, ActorDetailsDto.BuildTargetData(log, target, usedSkills, usedBuffs, cr));
                logData.Targets.Add(targetDto);
            }
            //
            log.UpdateProgressWithCancellationCheck("HTML: building Skill/Buff dictionaries");
            Dictionary <Spec, IReadOnlyList <Buff> >           persBuffDict      = BuildPersonalBuffData(log, logData.PersBuffs, usedBuffs);
            Dictionary <Spec, IReadOnlyList <DamageModifier> > persDamageModDict = BuildPersonalDamageModData(log, logData.DmgModifiersPers, usedDamageMods);
            var allDamageMods         = new HashSet <string>();
            var commonDamageModifiers = new List <DamageModifier>();
            var itemDamageModifiers   = new List <DamageModifier>();

            BuildDictionaries(log, usedBuffs, usedDamageMods, logData, allDamageMods, commonDamageModifiers, itemDamageModifiers);
            //
            log.UpdateProgressWithCancellationCheck("HTML: building Phases");
            IReadOnlyList <PhaseData> phases = log.FightData.GetPhases(log);

            for (int i = 0; i < phases.Count; i++)
            {
                PhaseData phase    = phases[i];
                var       phaseDto = new PhaseDto(phase, phases, log, persBuffDict, commonDamageModifiers, itemDamageModifiers, persDamageModDict);
                logData.Phases.Add(phaseDto);
            }
            //
            if (log.CombatData.HasEXTHealing)
            {
                log.UpdateProgressWithCancellationCheck("HTML: building Healing Extension");
                logData.HealingStatsExtension = new HealingStatsExtension(log, usedSkills, usedBuffs);
            }
            //
            SkillDto.AssembleSkills(usedSkills.Values, logData.SkillMap, log);
            DamageModDto.AssembleDamageModifiers(usedDamageMods, logData.DamageModMap);
            BuffDto.AssembleBoons(usedBuffs.Values, logData.BuffMap, log);
            MechanicDto.BuildMechanics(log.MechanicData.GetPresentMechanics(log, 0, log.FightData.FightEnd), logData.MechanicMap);
            return(logData);
        }
        public static LogDataDto BuildLogData(ParsedEvtcLog log, Dictionary <long, SkillItem> usedSkills, Dictionary <long, Buff> usedBuffs, HashSet <DamageModifier> usedDamageMods, bool cr, bool light, Version parserVersion, string[] uploadLinks)
        {
            StatisticsHelper statistics = log.StatisticsHelper;

            log.UpdateProgressWithCancellationCheck("HTML: building Log Data");
            var logData = new LogDataDto
            {
                EncounterStart = log.LogData.LogStartStd,
                EncounterEnd   = log.LogData.LogEndStd,
                ArcVersion     = log.LogData.ArcVersion,
                Gw2Build       = log.LogData.GW2Build,
                FightID        = log.FightData.TriggerID,
                Parser         = "Elite Insights " + parserVersion.ToString(),
                RecordedBy     = log.LogData.PoVName,
                UploadLinks    = uploadLinks.ToList()
            };

            if (cr)
            {
                logData.CrData = new CombatReplayDto(log);
            }
            log.UpdateProgressWithCancellationCheck("HTML: building Players");
            foreach (Player player in log.PlayerList)
            {
                logData.HasCommander = logData.HasCommander || player.HasCommanderTag;
                logData.Players.Add(new PlayerDto(player, log, ActorDetailsDto.BuildPlayerData(log, player, usedSkills, usedBuffs)));
            }

            log.UpdateProgressWithCancellationCheck("HTML: building Enemies");
            foreach (AbstractSingleActor enemy in log.MechanicData.GetEnemyList(log, log.FightData.FightStart, log.FightData.FightEnd))
            {
                logData.Enemies.Add(new EnemyDto()
                {
                    Name = enemy.Character
                });
            }

            log.UpdateProgressWithCancellationCheck("HTML: building Targets");
            foreach (NPC target in log.FightData.Logic.Targets)
            {
                var targetDto = new TargetDto(target, log, ActorDetailsDto.BuildTargetData(log, target, usedSkills, usedBuffs, cr));
                logData.Targets.Add(targetDto);
            }
            //
            log.UpdateProgressWithCancellationCheck("HTML: building Skill/Buff dictionaries");
            Dictionary <string, List <Buff> >           persBuffDict      = BuildPersonalBoonData(log, logData.PersBuffs, usedBuffs);
            Dictionary <string, List <DamageModifier> > persDamageModDict = BuildPersonalDamageModData(log, logData.DmgModifiersPers, usedDamageMods);
            var allDamageMods = new HashSet <string>();

            foreach (Player p in log.PlayerList)
            {
                allDamageMods.UnionWith(p.GetPresentDamageModifier(log));
            }
            var commonDamageModifiers = new List <DamageModifier>();

            if (log.DamageModifiers.DamageModifiersPerSource.TryGetValue(ParserHelper.Source.Common, out IReadOnlyList <DamageModifier> list))
            {
                foreach (DamageModifier dMod in list)
                {
                    if (allDamageMods.Contains(dMod.Name))
                    {
                        commonDamageModifiers.Add(dMod);
                        logData.DmgModifiersCommon.Add(dMod.ID);
                        usedDamageMods.Add(dMod);
                    }
                }
            }
            if (log.DamageModifiers.DamageModifiersPerSource.TryGetValue(ParserHelper.Source.FightSpecific, out list))
            {
                foreach (DamageModifier dMod in list)
                {
                    if (allDamageMods.Contains(dMod.Name))
                    {
                        commonDamageModifiers.Add(dMod);
                        logData.DmgModifiersCommon.Add(dMod.ID);
                        usedDamageMods.Add(dMod);
                    }
                }
            }
            var itemDamageModifiers = new List <DamageModifier>();

            if (log.DamageModifiers.DamageModifiersPerSource.TryGetValue(ParserHelper.Source.Item, out list))
            {
                foreach (DamageModifier dMod in list)
                {
                    if (allDamageMods.Contains(dMod.Name))
                    {
                        itemDamageModifiers.Add(dMod);
                        logData.DmgModifiersItem.Add(dMod.ID);
                        usedDamageMods.Add(dMod);
                    }
                }
            }
            foreach (Buff boon in statistics.PresentBoons)
            {
                logData.Boons.Add(boon.ID);
                usedBuffs[boon.ID] = boon;
            }
            foreach (Buff boon in statistics.PresentConditions)
            {
                logData.Conditions.Add(boon.ID);
                usedBuffs[boon.ID] = boon;
            }
            foreach (Buff boon in statistics.PresentOffbuffs)
            {
                logData.OffBuffs.Add(boon.ID);
                usedBuffs[boon.ID] = boon;
            }
            foreach (Buff boon in statistics.PresentSupbuffs)
            {
                logData.SupBuffs.Add(boon.ID);
                usedBuffs[boon.ID] = boon;
            }
            foreach (Buff boon in statistics.PresentDefbuffs)
            {
                logData.DefBuffs.Add(boon.ID);
                usedBuffs[boon.ID] = boon;
            }
            foreach (Buff boon in statistics.PresentFractalInstabilities)
            {
                logData.FractalInstabilities.Add(boon.ID);
                usedBuffs[boon.ID] = boon;
            }
            //
            log.UpdateProgressWithCancellationCheck("HTML: building Phases");
            IReadOnlyList <PhaseData> phases = log.FightData.GetPhases(log);

            for (int i = 0; i < phases.Count; i++)
            {
                PhaseData phase    = phases[i];
                var       phaseDto = new PhaseDto(phase, phases, log)
                {
                    DpsStats        = PhaseDto.BuildDPSData(log, phase),
                    DpsStatsTargets = PhaseDto.BuildDPSTargetsData(log, phase),
                    DmgStatsTargets = PhaseDto.BuildDMGStatsTargetsData(log, phase),
                    DmgStats        = PhaseDto.BuildDMGStatsData(log, phase),
                    DefStats        = PhaseDto.BuildDefenseData(log, phase),
                    SupportStats    = PhaseDto.BuildSupportData(log, phase),
                    //
                    BoonStats             = BuffData.BuildBuffUptimeData(log, statistics.PresentBoons, phase),
                    OffBuffStats          = BuffData.BuildBuffUptimeData(log, statistics.PresentOffbuffs, phase),
                    SupBuffStats          = BuffData.BuildBuffUptimeData(log, statistics.PresentSupbuffs, phase),
                    DefBuffStats          = BuffData.BuildBuffUptimeData(log, statistics.PresentDefbuffs, phase),
                    PersBuffStats         = BuffData.BuildPersonalBuffUptimeData(log, persBuffDict, phase),
                    BoonGenSelfStats      = BuffData.BuildBuffGenerationData(log, statistics.PresentBoons, phase, BuffEnum.Self),
                    BoonGenGroupStats     = BuffData.BuildBuffGenerationData(log, statistics.PresentBoons, phase, BuffEnum.Group),
                    BoonGenOGroupStats    = BuffData.BuildBuffGenerationData(log, statistics.PresentBoons, phase, BuffEnum.OffGroup),
                    BoonGenSquadStats     = BuffData.BuildBuffGenerationData(log, statistics.PresentBoons, phase, BuffEnum.Squad),
                    OffBuffGenSelfStats   = BuffData.BuildBuffGenerationData(log, statistics.PresentOffbuffs, phase, BuffEnum.Self),
                    OffBuffGenGroupStats  = BuffData.BuildBuffGenerationData(log, statistics.PresentOffbuffs, phase, BuffEnum.Group),
                    OffBuffGenOGroupStats = BuffData.BuildBuffGenerationData(log, statistics.PresentOffbuffs, phase, BuffEnum.OffGroup),
                    OffBuffGenSquadStats  = BuffData.BuildBuffGenerationData(log, statistics.PresentOffbuffs, phase, BuffEnum.Squad),
                    SupBuffGenSelfStats   = BuffData.BuildBuffGenerationData(log, statistics.PresentSupbuffs, phase, BuffEnum.Self),
                    SupBuffGenGroupStats  = BuffData.BuildBuffGenerationData(log, statistics.PresentSupbuffs, phase, BuffEnum.Group),
                    SupBuffGenOGroupStats = BuffData.BuildBuffGenerationData(log, statistics.PresentSupbuffs, phase, BuffEnum.OffGroup),
                    SupBuffGenSquadStats  = BuffData.BuildBuffGenerationData(log, statistics.PresentSupbuffs, phase, BuffEnum.Squad),
                    DefBuffGenSelfStats   = BuffData.BuildBuffGenerationData(log, statistics.PresentDefbuffs, phase, BuffEnum.Self),
                    DefBuffGenGroupStats  = BuffData.BuildBuffGenerationData(log, statistics.PresentDefbuffs, phase, BuffEnum.Group),
                    DefBuffGenOGroupStats = BuffData.BuildBuffGenerationData(log, statistics.PresentDefbuffs, phase, BuffEnum.OffGroup),
                    DefBuffGenSquadStats  = BuffData.BuildBuffGenerationData(log, statistics.PresentDefbuffs, phase, BuffEnum.Squad),
                    //
                    BoonActiveStats             = BuffData.BuildActiveBuffUptimeData(log, statistics.PresentBoons, phase),
                    OffBuffActiveStats          = BuffData.BuildActiveBuffUptimeData(log, statistics.PresentOffbuffs, phase),
                    SupBuffActiveStats          = BuffData.BuildActiveBuffUptimeData(log, statistics.PresentSupbuffs, phase),
                    DefBuffActiveStats          = BuffData.BuildActiveBuffUptimeData(log, statistics.PresentDefbuffs, phase),
                    PersBuffActiveStats         = BuffData.BuildActivePersonalBuffUptimeData(log, persBuffDict, phase),
                    BoonGenActiveSelfStats      = BuffData.BuildActiveBuffGenerationData(log, statistics.PresentBoons, phase, BuffEnum.Self),
                    BoonGenActiveGroupStats     = BuffData.BuildActiveBuffGenerationData(log, statistics.PresentBoons, phase, BuffEnum.Group),
                    BoonGenActiveOGroupStats    = BuffData.BuildActiveBuffGenerationData(log, statistics.PresentBoons, phase, BuffEnum.OffGroup),
                    BoonGenActiveSquadStats     = BuffData.BuildActiveBuffGenerationData(log, statistics.PresentBoons, phase, BuffEnum.Squad),
                    OffBuffGenActiveSelfStats   = BuffData.BuildActiveBuffGenerationData(log, statistics.PresentOffbuffs, phase, BuffEnum.Self),
                    OffBuffGenActiveGroupStats  = BuffData.BuildActiveBuffGenerationData(log, statistics.PresentOffbuffs, phase, BuffEnum.Group),
                    OffBuffGenActiveOGroupStats = BuffData.BuildActiveBuffGenerationData(log, statistics.PresentOffbuffs, phase, BuffEnum.OffGroup),
                    OffBuffGenActiveSquadStats  = BuffData.BuildActiveBuffGenerationData(log, statistics.PresentOffbuffs, phase, BuffEnum.Squad),
                    SupBuffGenActiveSelfStats   = BuffData.BuildActiveBuffGenerationData(log, statistics.PresentSupbuffs, phase, BuffEnum.Self),
                    SupBuffGenActiveGroupStats  = BuffData.BuildActiveBuffGenerationData(log, statistics.PresentSupbuffs, phase, BuffEnum.Group),
                    SupBuffGenActiveOGroupStats = BuffData.BuildActiveBuffGenerationData(log, statistics.PresentSupbuffs, phase, BuffEnum.OffGroup),
                    SupBuffGenActiveSquadStats  = BuffData.BuildActiveBuffGenerationData(log, statistics.PresentSupbuffs, phase, BuffEnum.Squad),
                    DefBuffGenActiveSelfStats   = BuffData.BuildActiveBuffGenerationData(log, statistics.PresentDefbuffs, phase, BuffEnum.Self),
                    DefBuffGenActiveGroupStats  = BuffData.BuildActiveBuffGenerationData(log, statistics.PresentDefbuffs, phase, BuffEnum.Group),
                    DefBuffGenActiveOGroupStats = BuffData.BuildActiveBuffGenerationData(log, statistics.PresentDefbuffs, phase, BuffEnum.OffGroup),
                    DefBuffGenActiveSquadStats  = BuffData.BuildActiveBuffGenerationData(log, statistics.PresentDefbuffs, phase, BuffEnum.Squad),
                    //
                    DmgModifiersCommon = DamageModData.BuildDmgModifiersData(log, i, commonDamageModifiers),
                    DmgModifiersItem   = DamageModData.BuildDmgModifiersData(log, i, itemDamageModifiers),
                    DmgModifiersPers   = DamageModData.BuildPersonalDmgModifiersData(log, i, persDamageModDict),
                    TargetsCondiStats  = new List <List <BuffData> >(),
                    TargetsCondiTotals = new List <BuffData>(),
                    TargetsBoonTotals  = new List <BuffData>(),
                    MechanicStats      = MechanicDto.BuildPlayerMechanicData(log, phase),
                    EnemyMechanicStats = MechanicDto.BuildEnemyMechanicData(log, phase)
                };
                foreach (NPC target in phase.Targets)
                {
                    phaseDto.TargetsCondiStats.Add(BuffData.BuildTargetCondiData(log, phase.Start, phase.End, target));
                    phaseDto.TargetsCondiTotals.Add(BuffData.BuildTargetCondiUptimeData(log, phase, target));
                    phaseDto.TargetsBoonTotals.Add(HasBoons(log, phase, target) ? BuffData.BuildTargetBoonData(log, phase, target) : null);
                }
                logData.Phases.Add(phaseDto);
            }
            //
            log.UpdateProgressWithCancellationCheck("HTML: building Meta Data");
            logData.EncounterDuration = log.FightData.DurationString;
            logData.Success           = log.FightData.Success;
            logData.Wvw               = log.FightData.Logic.Mode == FightLogic.ParseMode.WvW;
            logData.Targetless        = log.FightData.Logic.Targetless;
            logData.FightName         = log.FightData.GetFightName(log);
            logData.FightIcon         = log.FightData.Logic.Icon;
            logData.LightTheme        = light;
            logData.SingleGroup       = log.PlayerList.Where(x => !x.IsFakeActor).Select(x => x.Group).Distinct().Count() == 1;
            logData.HasBreakbarDamage = log.CombatData.HasBreakbarDamageData;
            logData.NoMechanics       = log.FightData.Logic.HasNoFightSpecificMechanics;
            if (log.LogData.LogErrors.Count > 0)
            {
                logData.LogErrors = new List <string>(log.LogData.LogErrors);
            }
            //
            SkillDto.AssembleSkills(usedSkills.Values, logData.SkillMap, log.SkillData);
            DamageModDto.AssembleDamageModifiers(usedDamageMods, logData.DamageModMap);
            BuffDto.AssembleBoons(usedBuffs.Values, logData.BuffMap, log);
            MechanicDto.BuildMechanics(log.MechanicData.GetPresentMechanics(log, log.FightData.FightStart, log.FightData.FightEnd), logData.MechanicMap);
            return(logData);
        }