Beispiel #1
0
        public void UpdateStats()
        {
            if (IsPartyStats)
            {
                return;
            }

            //update stats
            DamageFraction = _tracker.TotalDealt.Damage == 0 ? 1 : (double)Damage / _tracker.TotalDealt.Damage;
            Dps            = _tracker.CalculateDps(Damage);

            //update personal DPS
            var firstOrDefault = _skillLog.FirstOrDefault(s => _tracker.IsValidAttack(s));
            var lastOrDefault  = _skillLog.LastOrDefault(s => _tracker.IsValidAttack(s));

            PersonalDps = (firstOrDefault != null && lastOrDefault != null)
                ? _tracker.CalculateDps(Damage, lastOrDefault.Time - firstOrDefault.Time)
                : _tracker.CalculateDps(Damage, TimeSpan.Zero);
        }