public static Dictionary <string, double> GetRTakenDPSGroup(this CombatantData data) { var damage = data.GetDamage(); var duration = data.Parent.GetBossDuration().TotalSeconds; if (damage == null || duration < 0) { return(null); } var group = new Dictionary <string, double>(); damage.BuffTakenDamages.ForEach(x => { if (x.BuffTaken.Swing.Attacker != data.Name) { if (group.ContainsKey(x.BuffTaken.Swing.AttackType)) { group[x.BuffTaken.Swing.AttackType] += x.Value / duration; } else { group.Add(x.BuffTaken.Swing.AttackType, x.Value / duration); } } }); return(group); }
public static double GetPDPS(this CombatantData data) { var damage = data.GetDamage(); var duration = data.Parent.GetBossDuration().TotalSeconds; if (damage == null || duration < 0) { return(-1); } return(damage.Value / duration); }
public static double GetADPS(this CombatantData data) { var damage = data.GetDamage(); var duration = data.Parent.GetBossDuration().TotalSeconds; if (damage == null || duration < 0) { return(-1); } var takenDPS = data.GetATakenDPSGroup().Values.Sum(); return((damage.Value / duration) - takenDPS); }