Exemplo n.º 1
0
        public SkillDps(DamageMeter.Skills.Skill.Skill skill, SkillStats stats)
        {
            InitializeComponent();

            LabelName.Content = skill.SkillName;
            Update(skill, stats);
        }
Exemplo n.º 2
0
        public void Update(DamageMeter.Skills.Skill.Skill skill, SkillStats stats, Entity currentBoss, bool timedEncounter)
        {
            var skillsId = "";

            for (var i = 0; i < skill.SkillId.Count; i++)
            {
                skillsId += skill.SkillId[i];
                if (i < skill.SkillId.Count - 1)
                {
                    skillsId += ",";
                }
            }

            LabelName.ToolTip          = skillsId;
            LabelNumberHitMana.Content = stats.HitsMana;
            LabelTotalMana.Content     = FormatHelpers.Instance.FormatValue(stats.Mana);

            IEnumerable <KeyValuePair <int, SkillDetailStats> > listStats = stats.SkillDetails.ToList();

            listStats = listStats.OrderByDescending(stat => stat.Value.Mana);
            SkillsDetailList.Items.Clear();
            foreach (var stat in listStats)
            {
                SkillsDetailList.Items.Add(new SkillDetailMana(stat.Value));
            }
        }
Exemplo n.º 3
0
        public SkillDps(DamageMeter.Skills.Skill.Skill skill, SkillStats stats, Entity currentBoss, bool timedEncounter)
        {
            InitializeComponent();

            LabelName.Content = skill.SkillName;
            SkillIcon.Source  = BasicTeraData.Instance.Icons.GetImage(skill.IconName);
            Update(skill, stats, currentBoss, timedEncounter);
        }
Exemplo n.º 4
0
        private static void UpdateSkillStats(SkillResult message, Entity entityTarget, PlayerInfo playerInfo, long time)
        {
            var entities = playerInfo.Dealt;

            entities.AddStats(time, entityTarget, new SkillsStats(playerInfo));

            var skillName      = message.SkillId.ToString();
            var skillShortName = message.SkillShortName;
            var iconName       = "";

            if (message.Skill != null)
            {
                skillName = message.Skill.Name;
                iconName  = message.Skill.IconName;
            }
            var skillKey = new Skill(skillName, skillShortName, new List <int> {
                message.SkillId
            }, iconName, message.Skill?.NpcInfo);


            SkillStats skillStats;
            var        dictionarySkillStats = entities.GetSkills(time, entityTarget);

            dictionarySkillStats.TryGetValue(skillKey, out skillStats);
            if (skillStats == null)
            {
                skillStats = new SkillStats(playerInfo, entityTarget);
            }
            if (message.IsHp)
            {
                if (message.IsHeal)
                {
                    skillStats.AddData(message.SkillId, message.Heal, message.IsCritical, SkillStats.Type.Heal, time);
                }
                else
                {
                    skillStats.AddData(message.SkillId, message.Damage, message.IsCritical, SkillStats.Type.Damage, time);
                }
            }
            else
            {
                skillStats.AddData(message.SkillId, message.Mana, message.IsCritical, SkillStats.Type.Mana, time);
            }

            var skill      = dictionarySkillStats.Keys.ToList();
            var indexSkill = skill.IndexOf(skillKey);

            if (indexSkill != -1)
            {
                foreach (
                    var skillid in skill[indexSkill].SkillId.Where(skillid => !skillKey.SkillId.Contains(skillid)))
                {
                    skillKey.SkillId.Add(skillid);
                }
            }
            dictionarySkillStats.Remove(skillKey);
            dictionarySkillStats.Add(skillKey, skillStats);
        }
Exemplo n.º 5
0
        public void Update(DamageMeter.Skills.Skill.Skill skill, SkillStats stats)
        {
            var skillsId = "";

            for (var i = 0; i < skill.SkillId.Count; i++)
            {
                skillsId += skill.SkillId[i];
                if (i < skill.SkillId.Count - 1)
                {
                    skillsId += ",";
                }
            }

            LabelId.Content           = skillsId;
            LabelCritRateHeal.Content = stats.CritRateHeal + "%";


            LabelNumberHitHeal.Content  = stats.HitsHeal;
            LabelNumberCritHeal.Content = stats.CritsHeal;

            LabelTotalHeal.Content   = FormatHelpers.Instance.FormatValue(stats.Heal);
            LabelBiggestHit.Content  = FormatHelpers.Instance.FormatValue(stats.HealBiggestHit);
            LabelBiggestCrit.Content = FormatHelpers.Instance.FormatValue(stats.HealBiggestCrit);


            LabelAverageCrit.Content = FormatHelpers.Instance.FormatValue(stats.HealAverageCrit);
            LabelAverageHit.Content  = FormatHelpers.Instance.FormatValue(stats.HealAverageHit);
            LabelAverage.Content     = FormatHelpers.Instance.FormatValue(stats.HealAverageTotal);


            IEnumerable <KeyValuePair <int, SkillDetailStats> > listStats = stats.SkillDetails.ToList();

            listStats = listStats.OrderByDescending(stat => stat.Value.HealAverageTotal);
            SkillsDetailList.Items.Clear();
            foreach (var stat in listStats)
            {
                SkillsDetailList.Items.Add(new SkillDetailHeal(stat.Value));
            }
        }
Exemplo n.º 6
0
        public void Update(DamageMeter.Skills.Skill.Skill skill, SkillStats stats, Entity currentBoss, bool timedEncounter)
        {
            var skillsId = "";

            for (var i = 0; i < skill.SkillId.Count; i++)
            {
                skillsId += skill.SkillId[i];
                if (i < skill.SkillId.Count - 1)
                {
                    skillsId += ",";
                }
            }

            LabelName.ToolTip        = skillsId;
            LabelCritRateDmg.Content = stats.CritRateDmg + "%";

            LabelDamagePercentage.Content = stats.DamagePercentage(currentBoss, timedEncounter) + "%";
            LabelTotalDamage.Content      = FormatHelpers.Instance.FormatValue(stats.Damage);

            LabelNumberHitDmg.Content = stats.HitsDmg;

            LabelNumberCritDmg.Content = stats.CritsDmg;

            LabelAverageCrit.Content  = FormatHelpers.Instance.FormatValue(stats.DmgAverageCrit);
            LabelBiggestCrit.Content  = FormatHelpers.Instance.FormatValue(stats.DmgBiggestCrit);
            LabelAverageHit.Content   = FormatHelpers.Instance.FormatValue(stats.DmgAverageHit);
            LabelAverageTotal.Content = FormatHelpers.Instance.FormatValue(stats.DmgAverageTotal);

            IEnumerable <KeyValuePair <int, SkillDetailStats> > listStats = stats.SkillDetails.ToList();

            listStats = listStats.OrderByDescending(stat => stat.Value.Damage);
            SkillsDetailList.Items.Clear();
            foreach (var stat in listStats)
            {
                SkillsDetailList.Items.Add(new SkillDetailDps(stat.Value, currentBoss, timedEncounter));
            }
        }
Exemplo n.º 7
0
 public bool Equals(Skill other)
 {
     return(SkillName.Equals(other.SkillName));
 }