Пример #1
0
 public void Add(SkillStats other)
 {
     Damage += other.Damage;
     Heal += other.Heal;
     Hits += other.Hits;
     Crits += other.Crits;
 }
Пример #2
0
 public DamageTracker(bool onlyboss, bool ignoreoneshots)
 {
     TotalDealt     = new SkillStats();
     TotalReceived  = new SkillStats();
     OnlyBosses     = onlyboss;
     IgnoreOneshots = ignoreoneshots;
 }
Пример #3
0
 public PlayerInfo(Player user, DamageTracker tracker)
 {
     _tracker = tracker;
     Player   = user;
     Received = new SkillStats();
     Dealt    = new SkillStats();
 }
Пример #4
0
 public PlayerInfo(Player user, DamageTracker tracker)
 {
     _tracker = tracker;
     Player = user;
     Received = new SkillStats();
     Dealt = new SkillStats();
 }
Пример #5
0
 public void Add(SkillStats other)
 {
     Damage += other.Damage;
     Heal   += other.Heal;
     Crits  += other.Crits;
     Hits   += other.Hits;
 }
Пример #6
0
 public PlayerInfo(Player user)
 {
     FirstHit = 0;
     LastHit = 0;
     Player = user;
     Received = new SkillStats();
     Dealt = new SkillStats(this);
 }
Пример #7
0
 public PlayerInfo(Player user)
 {
     FirstHit = 0;
     LastHit  = 0;
     Player   = user;
     Received = new SkillStats();
     Dealt    = new SkillStats(this);
 }
Пример #8
0
 public DamageTracker(EntityTracker entityRegistry, PlayerTracker playerTracker, SkillDatabase skillDatabase)
 {
     _entityTracker = entityRegistry;
     _skillDatabase = skillDatabase;
     _playerTracker = playerTracker;
     TotalDealt     = new SkillStats();
     TotalReceived  = new SkillStats();
 }
Пример #9
0
        public PlayerInfo(Player user, DamageTracker tracker)
        {
            Tracker = tracker;
            Player = user;
            SkillLog = new ThreadSafeObservableCollection<SkillResult>();

            Received = new SkillStats(tracker, SkillLog);
            Dealt = new SkillStats(tracker, SkillLog);
        }
Пример #10
0
        public PlayerInfo(Player user, DamageTracker tracker)
        {
            Tracker  = tracker;
            Player   = user;
            SkillLog = new ThreadSafeObservableCollection <SkillResult>();

            Received = new SkillStats(tracker, SkillLog);
            Dealt    = new SkillStats(tracker, SkillLog);
        }
Пример #11
0
        public PlayerInfo(Player user, DamageTracker tracker)
        {
            Tracker = tracker;
            Player = user;
            Received = new SkillStats();
            Dealt = new SkillStats();
            SkillLog = new ThreadSafeObservableCollection<SkillResult>();

            Dealt.PropertyChanged += DealtOnPropertyChanged;
        }
Пример #12
0
        private void UpdateStats(SkillStats stats, SkillResult message)
        {
            if (message.Amount == 0)
            {
                return;
            }

            stats.Damage += message.Damage;
            stats.Heal   += message.Heal;
            stats.Hits++;
            if (message.IsCritical)
            {
                stats.Crits++;
            }
        }
Пример #13
0
        private SkillStats StatsChange(SkillResult message)
        {
            var result = new SkillStats();

            if (message.Amount == 0)
            {
                return(result);
            }

            /// Fix counting self-damage, such as Death from above & Command: Self-destruct
            if ((message.Source.RootOwner == message.Target.RootOwner) && (message.Damage > 0))
            {
                return(result);
            }

            NpcEntity npctarget = message.Target as NpcEntity;

            if (npctarget != null)
            {
                if (OnlyBosses)       /// not count bosses
                {
                    if (!npctarget.Info.Boss)
                    {
                        return(result);
                    }
                }
                if (IgnoreOneshots)    /// ignore damage that is more than 10x times than mob's hp
                {
                    if ((npctarget.Info.HP > 0) && (npctarget.Info.HP <= message.Damage / 10))
                    {
                        return(result);
                    }
                }
            }

            result.Damage = message.Damage;
            result.Heal   = message.Heal;
            result.Hits++;
            if (message.IsCritical)
            {
                result.Crits++;
            }

            return(result);
        }
Пример #14
0
        private SkillStats StatsChange(SkillResult message)
        {
            var result = new SkillStats();

            if (message.Amount == 0)
            {
                return(result);
            }

            result.Damage = message.Damage;
            result.Heal   = message.Heal;
            result.Hits++;
            if (message.IsCritical)
            {
                result.Crits++;
            }

            return(result);
        }
Пример #15
0
 public PlayerInfo(Player user)
 {
     Player   = user;
     Received = new SkillStats();
     Dealt    = new SkillStats();
 }
Пример #16
0
 public PlayerInfo(Player user)
 {
     Player = user;
     Received = new SkillStats();
     Dealt = new SkillStats();
 }
Пример #17
0
        private SkillStats StatsChange(SkillResult message)
        {
            var result = new SkillStats();
            if (message.Amount == 0)
                return result;

            result.Damage = message.Damage;
            result.Heal = message.Heal;

            if (IsFromHealer(message) || (!IsFromHealer(message) && !message.IsHeal))
            {
                result.Hits++;
                if (message.IsCritical)
                    result.Crits++;
            }

            return result;
        }
Пример #18
0
        private SkillStats StatsChange(SkillResult message)
        {
            var result = new SkillStats();
            if (message.Amount == 0)
                return result;

            result.Damage = message.Damage;
            result.Heal = message.Heal;

            result.Hits++;
            if (message.IsCritical)
                result.Crits++;

            return result;
        }
Пример #19
0
 public DamageTracker()
 {
     StatsByUser = new ThreadSafeObservableCollection<PlayerInfo>();
     TotalDealt = new SkillStats();
     TotalReceived = new SkillStats();
 }