private JsonDPS[][] BuildDPSTarget(Player p) { JsonDPS[][] res = new JsonDPS[_log.FightData.Logic.Targets.Count][]; int i = 0; foreach (Target tar in _log.FightData.Logic.Targets) { res[i++] = p.GetDPSTarget(_log, tar).Select(x => new JsonDPS(x)).ToArray(); } return(res); }
private JsonDPS[][] BuildDPSTarget(Dictionary <Target, Dictionary <Player, Statistics.FinalDPS[]> > stats, Player p) { JsonDPS[][] res = new JsonDPS[_log.FightData.Logic.Targets.Count][]; int i = 0; foreach (Target tar in _log.FightData.Logic.Targets) { res[i++] = stats[tar][p].Select(x => new JsonDPS(x)).ToArray(); } return(res); }
public static JsonDPS BuildJsonDPS(FinalDPS stats) { var jsonDPS = new JsonDPS(); jsonDPS.Dps = stats.Dps; jsonDPS.Damage = stats.Damage; jsonDPS.CondiDps = stats.CondiDps; jsonDPS.CondiDamage = stats.CondiDamage; jsonDPS.PowerDps = stats.PowerDps; jsonDPS.PowerDamage = stats.PowerDamage; jsonDPS.BreakbarDamage = stats.BreakbarDamage; jsonDPS.ActorDps = stats.ActorDps; jsonDPS.ActorDamage = stats.ActorDamage; jsonDPS.ActorCondiDps = stats.ActorCondiDps; jsonDPS.ActorCondiDamage = stats.ActorCondiDamage; jsonDPS.ActorPowerDps = stats.ActorPowerDps; jsonDPS.ActorPowerDamage = stats.ActorPowerDamage; jsonDPS.ActorBreakbarDamage = stats.ActorBreakbarDamage; return(jsonDPS); }
public static JsonDPS BuildJsonDPS(FinalDPS stats) { var jsonDPS = new JsonDPS { Dps = stats.Dps, Damage = stats.Damage, CondiDps = stats.CondiDps, CondiDamage = stats.CondiDamage, PowerDps = stats.PowerDps, PowerDamage = stats.PowerDamage, BreakbarDamage = stats.BreakbarDamage, ActorDps = stats.ActorDps, ActorDamage = stats.ActorDamage, ActorCondiDps = stats.ActorCondiDps, ActorCondiDamage = stats.ActorCondiDamage, ActorPowerDps = stats.ActorPowerDps, ActorPowerDamage = stats.ActorPowerDamage, ActorBreakbarDamage = stats.ActorBreakbarDamage }; return(jsonDPS); }
public JsonPlayer(Player player, ParsedLog log, Dictionary <string, JsonLog.SkillDesc> skillDesc, Dictionary <string, JsonLog.BuffDesc> buffDesc, Dictionary <string, JsonLog.DamageModDesc> damageModDesc, Dictionary <string, HashSet <long> > personalBuffs) : base(player, log, skillDesc, buffDesc) { List <PhaseData> phases = log.FightData.GetPhases(log); // Account = player.Account; Weapons = player.GetWeaponsArray(log).Select(w => w ?? "Unknown").ToArray(); Group = player.Group; Profession = player.Prof; ActiveTimes = phases.Select(x => x.GetActorActiveDuration(player, log)).ToList(); // Support = player.GetPlayerSupport(log).Select(x => new JsonPlayerSupport(x)).ToArray(); TargetDamage1S = new List <int> [log.FightData.Logic.Targets.Count][]; DpsTargets = new JsonDPS[log.FightData.Logic.Targets.Count][]; StatsTargets = new JsonGameplayStats[log.FightData.Logic.Targets.Count][]; TargetDamageDist = new List <JsonDamageDist> [log.FightData.Logic.Targets.Count][]; for (int j = 0; j < log.FightData.Logic.Targets.Count; j++) { NPC target = log.FightData.Logic.Targets[j]; var dpsGraphList = new List <int> [phases.Count]; var targetDamageDistList = new List <JsonDamageDist> [phases.Count]; for (int i = 0; i < phases.Count; i++) { PhaseData phase = phases[i]; if (log.ParserSettings.RawTimelineArrays) { dpsGraphList[i] = player.Get1SDamageList(log, i, phase, target); } targetDamageDistList[i] = JsonDamageDist.BuildJsonDamageDistList(player.GetDamageLogs(target, log, phase).Where(x => !x.HasDowned).GroupBy(x => x.SkillId).ToDictionary(x => x.Key, x => x.ToList()), log, skillDesc, buffDesc); } if (log.ParserSettings.RawTimelineArrays) { TargetDamage1S[j] = dpsGraphList; } TargetDamageDist[j] = targetDamageDistList; DpsTargets[j] = player.GetDPSTarget(log, target).Select(x => new JsonDPS(x)).ToArray(); StatsTargets[j] = player.GetGameplayStats(log, target).Select(x => new JsonGameplayStats(x)).ToArray(); } // BuffUptimes = GetPlayerJsonBuffsUptime(player, player.GetBuffs(log, BuffEnum.Self), player.GetBuffsDictionary(log), log, buffDesc, personalBuffs); SelfBuffs = GetPlayerBuffGenerations(player.GetBuffs(log, BuffEnum.Self), log, buffDesc); GroupBuffs = GetPlayerBuffGenerations(player.GetBuffs(log, BuffEnum.Group), log, buffDesc); OffGroupBuffs = GetPlayerBuffGenerations(player.GetBuffs(log, BuffEnum.OffGroup), log, buffDesc); SquadBuffs = GetPlayerBuffGenerations(player.GetBuffs(log, BuffEnum.Squad), log, buffDesc); // BuffUptimesActive = GetPlayerJsonBuffsUptime(player, player.GetActiveBuffs(log, BuffEnum.Self), player.GetBuffsDictionary(log), log, buffDesc, personalBuffs); SelfBuffsActive = GetPlayerBuffGenerations(player.GetActiveBuffs(log, BuffEnum.Self), log, buffDesc); GroupBuffsActive = GetPlayerBuffGenerations(player.GetActiveBuffs(log, BuffEnum.Group), log, buffDesc); OffGroupBuffsActive = GetPlayerBuffGenerations(player.GetActiveBuffs(log, BuffEnum.OffGroup), log, buffDesc); SquadBuffsActive = GetPlayerBuffGenerations(player.GetActiveBuffs(log, BuffEnum.Squad), log, buffDesc); // List <Consumable> consumables = player.GetConsumablesList(log, 0, log.FightData.FightEnd); if (consumables.Any()) { Consumables = new List <JsonConsumable>(); foreach (Consumable food in consumables) { if (!buffDesc.ContainsKey("b" + food.Buff.ID)) { buffDesc["b" + food.Buff.ID] = new JsonLog.BuffDesc(food.Buff); } Consumables.Add(new JsonConsumable(food)); } } // List <DeathRecap> deathRecaps = player.GetDeathRecaps(log); if (deathRecaps.Any()) { DeathRecap = deathRecaps.Select(x => new JsonDeathRecap(x)).ToList(); } // DamageModifiers = JsonDamageModifierData.GetDamageModifiers(player.GetDamageModifierStats(log, null), log, damageModDesc); DamageModifiersTarget = JsonDamageModifierData.GetDamageModifiersTarget(player, log, damageModDesc); }