public PlayerDto(Player player, ParsedLog log, bool cr, ActorDetailsDto details) { Group = player.Group; Name = player.Character; Acc = player.Account; Profession = player.Prof; Condi = player.Condition; Conc = player.Concentration; Heal = player.Healing; Tough = player.Toughness; ColTarget = GeneralHelper.GetLink("Color-" + player.Prof); ColCleave = GeneralHelper.GetLink("Color-" + player.Prof + "-NonBoss"); ColTotal = GeneralHelper.GetLink("Color-" + player.Prof + "-Total"); IsConjure = (player.IsFakeActor); BuildWeaponSets(player, log); Details = details; if (cr && !IsConjure) { CombatReplayID = player.GetCombatReplayID(log); } foreach (KeyValuePair <string, Minions> pair in player.GetMinions(log)) { Minions.Add(new MinionDto() { Id = pair.Value.MinionID, Name = pair.Key.TrimEnd(" \0".ToArray()) }); } }
public TargetDto(Target target, ParsedLog log, bool cr, ActorDetailsDto details) { Name = target.Character; Icon = GeneralHelper.GetNPCIcon(target.ID); Health = target.Health; HbHeight = target.HitboxHeight; HbWidth = target.HitboxWidth; Tough = target.Toughness; Details = details; if (cr) { CombatReplayID = target.GetCombatReplayID(log); } if (log.FightData.Success) { HpLeft = 0; } else { if (target.HealthOverTime.Count > 0) { HpLeft = target.HealthOverTime[target.HealthOverTime.Count - 1].hp; } } Percent = Math.Round(100.0 - HpLeft * 0.01, 2); foreach (KeyValuePair <string, Minions> pair in target.GetMinions(log)) { Minions.Add(new MinionDto() { Id = pair.Value.MinionID, Name = pair.Key.TrimEnd(" \0".ToArray()) }); } }