Exemplo n.º 1
0
 public void Add(SkillStats other)
 {
     Damage += other.Damage;
     Heal += other.Heal;
     Hits += other.Hits;
     Crits += other.Crits;
 }
Exemplo n.º 2
0
 public DamageTracker(bool onlyboss, bool ignoreoneshots)
 {
     TotalDealt     = new SkillStats();
     TotalReceived  = new SkillStats();
     OnlyBosses     = onlyboss;
     IgnoreOneshots = ignoreoneshots;
 }
Exemplo n.º 3
0
 public PlayerInfo(Player user, DamageTracker tracker)
 {
     _tracker = tracker;
     Player   = user;
     Received = new SkillStats();
     Dealt    = new SkillStats();
 }
Exemplo n.º 4
0
 public PlayerInfo(Player user, DamageTracker tracker)
 {
     _tracker = tracker;
     Player = user;
     Received = new SkillStats();
     Dealt = new SkillStats();
 }
Exemplo n.º 5
0
 public void Add(SkillStats other)
 {
     Damage += other.Damage;
     Heal   += other.Heal;
     Crits  += other.Crits;
     Hits   += other.Hits;
 }
Exemplo n.º 6
0
 public PlayerInfo(Player user)
 {
     FirstHit = 0;
     LastHit = 0;
     Player = user;
     Received = new SkillStats();
     Dealt = new SkillStats(this);
 }
Exemplo n.º 7
0
 public PlayerInfo(Player user)
 {
     FirstHit = 0;
     LastHit  = 0;
     Player   = user;
     Received = new SkillStats();
     Dealt    = new SkillStats(this);
 }
Exemplo n.º 8
0
 public DamageTracker(EntityTracker entityRegistry, PlayerTracker playerTracker, SkillDatabase skillDatabase)
 {
     _entityTracker = entityRegistry;
     _skillDatabase = skillDatabase;
     _playerTracker = playerTracker;
     TotalDealt     = new SkillStats();
     TotalReceived  = new SkillStats();
 }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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;
        }
Exemplo n.º 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++;
            }
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 15
0
 public PlayerInfo(Player user)
 {
     Player   = user;
     Received = new SkillStats();
     Dealt    = new SkillStats();
 }
Exemplo n.º 16
0
 public PlayerInfo(Player user)
 {
     Player = user;
     Received = new SkillStats();
     Dealt = new SkillStats();
 }
Exemplo n.º 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;
        }
Exemplo n.º 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;
        }
Exemplo n.º 19
0
 public DamageTracker()
 {
     StatsByUser = new ThreadSafeObservableCollection<PlayerInfo>();
     TotalDealt = new SkillStats();
     TotalReceived = new SkillStats();
 }