示例#1
0
        public void Update(Dictionary <long, Dictionary <DamageMeter.Skills.Skill.Skill, SkillStats> > timedSkills,
                           Dictionary <long, Dictionary <DamageMeter.Skills.Skill.Skill, SkillStats> > timedAllSkills,
                           PlayerInfo playerinfo, PlayerAbnormals buffs, Entity currentBoss, bool timedEncounter, long firstHit, long lastHit)
        {
            var lastTick  = (lastHit + 1) * TimeSpan.TicksPerSecond - 1;
            var firstTick = firstHit * TimeSpan.TicksPerSecond;
            var death     = buffs.Death;

            if (death == null)
            {
                DeathCounter.Content  = 0;
                DeathDuration.Content = "0s";
            }
            else
            {
                DeathCounter.Content = death.Count(firstTick, lastTick);
                var duration = death.Duration(firstTick, lastTick);
                var interval = TimeSpan.FromTicks(duration);
                DeathDuration.Content = interval.ToString(@"mm\:ss");
            }
            var aggro = buffs.Aggro(currentBoss?.NpcE);

            if (aggro == null)
            {
                AggroCounter.Content  = 0;
                AggroDuration.Content = "0s";
            }
            else
            {
                AggroCounter.Content = aggro.Count(firstTick, lastTick);
                var duration = aggro.Duration(firstTick, lastTick);
                var interval = TimeSpan.FromTicks(duration);
                AggroDuration.Content = interval.ToString(@"mm\:ss");
            }

            var skills    = NoTimedSkills(timedSkills);
            var allSkills = NoTimedSkills(timedAllSkills);

            if (_skillDps == null)
            {
                _skillDps  = new SkillsDetail(skills, SkillsDetail.Type.Dps, currentBoss, timedEncounter);
                _skillHeal = new SkillsDetail(allSkills, SkillsDetail.Type.Heal, currentBoss, timedEncounter);
                _skillMana = new SkillsDetail(allSkills, SkillsDetail.Type.Mana, currentBoss, timedEncounter);
                _buff      = new Buff(playerinfo, buffs, currentBoss);
            }
            else
            {
                _skillDps.Update(skills, currentBoss, timedEncounter);
                _skillHeal.Update(new Dictionary <DamageMeter.Skills.Skill.Skill, SkillStats>(allSkills), currentBoss, timedEncounter);
                _skillMana.Update(new Dictionary <DamageMeter.Skills.Skill.Skill, SkillStats>(allSkills), currentBoss, timedEncounter);
                _buff.Update(playerinfo, buffs, currentBoss);
            }
            HealPanel.Content = _skillHeal;
            DpsPanel.Content  = _skillDps;
            ManaPanel.Content = _skillMana;
            BuffPanel.Content = _buff;
        }
示例#2
0
        public void Update(Dictionary <long, Dictionary <DamageMeter.Skills.Skill.Skill, SkillStats> > timedSkills,
                           Dictionary <long, Dictionary <DamageMeter.Skills.Skill.Skill, SkillStats> > timedAllSkills,
                           PlayerInfo playerinfo)
        {
            // Console.WriteLine("thread id:"+Thread.CurrentThread.ManagedThreadId);
            var skills    = NoTimedSkills(timedSkills);
            var allSkills = NoTimedSkills(timedAllSkills);

            _buff.Update(playerinfo);
            _skillDps.Update(skills);
            _skillHeal.Update(new Dictionary <DamageMeter.Skills.Skill.Skill, SkillStats>(allSkills));
            _skillMana.Update(new Dictionary <DamageMeter.Skills.Skill.Skill, SkillStats>(allSkills));
            HealPanel.Content = _skillHeal;
            DpsPanel.Content  = _skillDps;
            ManaPanel.Content = _skillMana;
            BuffPanel.Content = _buff;
        }
示例#3
0
        public void Update(Dictionary <long, Dictionary <DamageMeter.Skills.Skill.Skill, SkillStats> > timedSkills,
                           Dictionary <long, Dictionary <DamageMeter.Skills.Skill.Skill, SkillStats> > timedAllSkills,
                           PlayerInfo playerinfo, Entity currentBoss, bool timedEncounter, long firstHit, long lastHit)
        {
            var death = playerinfo.Death;

            if (death == null)
            {
                DeathCounter.Content  = 0;
                DeathDuration.Content = "0s";
            }
            else
            {
                DeathCounter.Content = death.Count(firstHit, lastHit);
                var duration = death.Duration(firstHit, lastHit);
                var interval = TimeSpan.FromSeconds(duration);
                DeathDuration.Content = interval.ToString(@"mm\:ss");
            }

            var skills    = NoTimedSkills(timedSkills);
            var allSkills = NoTimedSkills(timedAllSkills);

            if (_skillDps == null)
            {
                _skillDps  = new SkillsDetail(skills, SkillsDetail.Type.Dps, currentBoss, timedEncounter);
                _skillHeal = new SkillsDetail(allSkills, SkillsDetail.Type.Heal, currentBoss, timedEncounter);
                _skillMana = new SkillsDetail(allSkills, SkillsDetail.Type.Mana, currentBoss, timedEncounter);
                _buff      = new Buff(playerinfo, currentBoss);
            }
            else
            {
                _skillDps.Update(skills, currentBoss, timedEncounter);
                _skillHeal.Update(new Dictionary <DamageMeter.Skills.Skill.Skill, SkillStats>(allSkills), currentBoss, timedEncounter);
                _skillMana.Update(new Dictionary <DamageMeter.Skills.Skill.Skill, SkillStats>(allSkills), currentBoss, timedEncounter);
                _buff.Update(playerinfo, currentBoss);
            }
            HealPanel.Content = _skillHeal;
            DpsPanel.Content  = _skillDps;
            ManaPanel.Content = _skillMana;
            BuffPanel.Content = _buff;
        }