public void Update(EntityInformation entityInformation, AbnormalityStorage abnormals)
        {
            EnduranceAbnormality.Items.Clear();
            if (entityInformation == null)
            {
                return;
            }
            if (entityInformation.Interval == 0)
            {
                return;
            }

            EnduranceAbnormality.Items.Add(_header);

            var count = 0;
            foreach (var abnormality in abnormals.Get(entityInformation.Entity))
            {
                EnduranceDebuff abnormalityUi;
                if (_enduranceDebuffsList.Count > count)
                {
                    abnormalityUi = _enduranceDebuffsList[count];
                }
                else
                {
                    abnormalityUi = new EnduranceDebuff();
                    _enduranceDebuffsList.Add(abnormalityUi);
                }

                abnormalityUi.Update(abnormality.Key, abnormality.Value,
                    entityInformation.BeginTime,
                    entityInformation.EndTime);
                EnduranceAbnormality.Items.Add(abnormalityUi);
                count++;
            }
        }
示例#2
0
        public Buff(PlayerDamageDealt playerDamageDealt, PlayerAbnormals buffs, EntityInformation entityInformation)
        {
            InitializeComponent();
            _header = new EnduranceDebuffHeader();
            ContentWidth = 1020;

            EnduranceAbnormality.Items.Clear();
            EnduranceAbnormality.Items.Add(_header);
            var counter = 0;
            foreach (var abnormality in buffs.Times.Where(x => x.Value.Duration(playerDamageDealt.BeginTime, playerDamageDealt.EndTime) > 0))
            {
                EnduranceDebuff abnormalityUi;
                if (_enduranceDebuffsList.Count > counter)
                {
                    abnormalityUi = _enduranceDebuffsList[counter];
                }
                else
                {
                    abnormalityUi = new EnduranceDebuff();
                    _enduranceDebuffsList.Add(abnormalityUi);
                }
                abnormalityUi.Update(abnormality.Key, abnormality.Value, playerDamageDealt.BeginTime, playerDamageDealt.EndTime);
                EnduranceAbnormality.Items.Add(abnormalityUi);

                counter++;
            }
        }
示例#3
0
 public Skills(PlayerStats parent, PlayerDamageDealt playerDamageDealt, EntityInformation entityInformation,
     Database.Structures.Skills skills, PlayerAbnormals buffs, bool timedEncounter)
 {
     InitializeComponent();
     _parent = parent;
     CloseWindow.Source = BasicTeraData.Instance.ImageDatabase.Close.Source;
     BackgroundColor.Opacity = BasicTeraData.Instance.WindowData.SkillWindowOpacity;
     Update(playerDamageDealt, entityInformation, skills, buffs, timedEncounter);
 }
示例#4
0
 public PlayerStats(PlayerDamageDealt playerDamageDealt, PlayerHealDealt playeHealDealt, EntityInformation entityInformation,
     Database.Structures.Skills skills, PlayerAbnormals buffs)
 {
     InitializeComponent();
     PlayerDamageDealt = playerDamageDealt;
     PlayerHealDealt = playeHealDealt;
     EntityInformation = entityInformation;
     Skills = skills;
     _buffs = buffs;
     Image = ClassIcons.Instance.GetImage(PlayerDamageDealt.Source.Class).Source;
     Class.Source = Image;
     LabelName.Content = PlayerName;
     LabelName.ToolTip = PlayerDamageDealt.Source.FullName;
 }
示例#5
0
 public StatsSummary(List<PlayerDamageDealt> playerDamageDealt, List<PlayerHealDealt> playerHealDealt, EntityInformation entityInformation)
 {
     PlayerDamageDealt = playerDamageDealt;
     PlayerHealDealt = playerHealDealt;
     EntityInformation = entityInformation;
 }
示例#6
0
        public void Update(PlayerDamageDealt playerDamageDealt, EntityInformation entityInformation,
            Database.Structures.Skills skills, PlayerAbnormals buffs, bool timedEncounter)
        {
            if (_skills == null || skills != null)
            {
                _skills = skills;
                var death = buffs.Death;
                if (death == null)
                {
                    DeathCounter.Content = 0;
                    DeathDuration.Content = "0" + LP.Seconds;
                }
                else
                {
                    DeathCounter.Content = death.Count(entityInformation.BeginTime, entityInformation.EndTime);
                    var duration = death.Duration(entityInformation.BeginTime, entityInformation.EndTime);
                    var interval = TimeSpan.FromTicks(duration);
                    DeathDuration.Content = interval.ToString(@"mm\:ss");
                }
                var aggro = buffs.Aggro(entityInformation.Entity);
                if (aggro == null)
                {
                    AggroCounter.Content = 0;
                    AggroDuration.Content = "0" + LP.Seconds;
                }
                else
                {
                    AggroCounter.Content = aggro.Count(entityInformation.BeginTime, entityInformation.EndTime);
                    var duration = aggro.Duration(entityInformation.BeginTime, entityInformation.EndTime);
                    var interval = TimeSpan.FromTicks(duration);
                    AggroDuration.Content = interval.ToString(@"mm\:ss");
                }

                //return;

                //var tabItem = (TabItem) TabControl.SelectedItem;
                //if (tabItem == null)
                //{
                //    TabControl.SelectedIndex = 0;
                //    tabItem = (TabItem) TabControl.SelectedItem;
                //}
                //switch (tabItem.Name)
                //{
                //    case "DpsPanel":
                //        if (_skillDps == null)
                //        {
                _skillDps =
                    new SkillsDetail(
                        SkillAggregate.GetAggregate(playerDamageDealt, entityInformation.Entity, _skills,
                            timedEncounter,
                            Database.Database.Type.Damage), Database.Database.Type.Damage);
                //}
                DpsPanel.Content = _skillDps;
                //    return;
                //case "HealPanel":
                //    if (_skillHeal == null)
                //    {
                _skillHeal =
                    new SkillsDetail(
                        SkillAggregate.GetAggregate(playerDamageDealt, entityInformation.Entity, _skills,
                            timedEncounter,
                            Database.Database.Type.Heal), Database.Database.Type.Heal);
                //    }
                HealPanel.Content = _skillHeal;
                //    return;
                //case "ManaPanel":
                //    if (_skillMana == null)
                //    {
                _skillMana =
                    new SkillsDetail(
                        SkillAggregate.GetAggregate(playerDamageDealt, entityInformation.Entity, _skills,
                            timedEncounter,
                            Database.Database.Type.Mana), Database.Database.Type.Mana);
                //    }
                ManaPanel.Content = _skillMana;
                //    return;
                //case "BuffPanel":
                //    if (_buff == null)
                //    {
                _buff = new Buff(playerDamageDealt, buffs, entityInformation);
                //    }
                BuffPanel.Content = _buff;
                //    return;
                //case "SkillsDealtPanel":
                //    if (_skillDealtLog == null)
                //    {
                _skillDealtLog =
                    new SkillsLog(
                        _skills?.GetSkillsDealt(playerDamageDealt.Source.User, entityInformation.Entity,
                            timedEncounter), false);
                //    }
                SkillsDealtPanel.Content = _skillDealtLog;
                //    return;
                //case "SkillsReceivedPanel":
                //    if (_skillReceivedLog == null)
                //    {
                _skillReceivedLog =
                    new SkillsLog(
                        _skills?.GetSkillsReceived(playerDamageDealt.Source.User, timedEncounter), true);
                //    }
                SkillsReceivedPanel.Content = _skillReceivedLog;
                //return;
            }
        }
示例#7
0
        public void Repaint(PlayerDamageDealt playerDamageDealt, PlayerHealDealt playerHealDealt, EntityInformation entityInformation,
            Database.Structures.Skills skills,
            PlayerAbnormals buffs, bool timedEncounter)
        {
            PlayerHealDealt = playerHealDealt;
            EntityInformation = entityInformation;
            PlayerDamageDealt = playerDamageDealt;
            _buffs = buffs;
            _timedEncounter = timedEncounter;
            Skills = skills;
            LabelDps.Content = GlobalDps;
            LabelDps.ToolTip = $"{LP.Individual_dps}: {Dps}";
            LabelCritRate.Content = PlayerDamageDealt.Source.IsHealer && BasicTeraData.Instance.WindowData.ShowHealCrit
                ? CritRateHeal
                : CritRate;
            var intervalTimespan = TimeSpan.FromSeconds(PlayerDamageDealt.Interval/TimeSpan.TicksPerSecond);
            LabelCritRate.ToolTip = $"{LP.Fight_Duration}: {intervalTimespan.ToString(@"mm\:ss")}";
            LabelCritRate.Foreground = PlayerDamageDealt.Source.IsHealer && BasicTeraData.Instance.WindowData.ShowHealCrit
                ? Brushes.LawnGreen
                : Brushes.LightCoral;
            LabelDamagePart.Content = DamagePart;
            LabelDamagePart.ToolTip = $"{LP.Damage_done}: {Damage}";

            _windowSkill?.Update(PlayerDamageDealt, EntityInformation, Skills, _buffs, _timedEncounter);
            Spacer.Width = 0;
            GridStats.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
            var SGrid =
                ((DamageMeter.UI.MainWindow)((System.Windows.FrameworkElement)
                    ((System.Windows.FrameworkElement) ((System.Windows.FrameworkElement) this.Parent).Parent).Parent).Parent)
                    .SGrid;
            var EGrid =
                ((DamageMeter.UI.MainWindow)((System.Windows.FrameworkElement)
                    ((System.Windows.FrameworkElement)((System.Windows.FrameworkElement)this.Parent).Parent).Parent).Parent)
                    .EGrid;
            SGrid.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
            var mainWidth = SGrid.DesiredSize.Width;
            Spacer.Width = mainWidth > GridStats.DesiredSize.Width ? mainWidth - GridStats.DesiredSize.Width : 0;
            DpsIndicator.Width = EntityInformation.TotalDamage == 0
                ? mainWidth
                : mainWidth * PlayerDamageDealt.Amount/EntityInformation.TotalDamage;
            EGrid.MaxWidth = Math.Max(mainWidth, GridStats.DesiredSize.Width);
        }
示例#8
0
 public StatsSummary(List <PlayerDamageDealt> playerDamageDealt, List <PlayerHealDealt> playerHealDealt, EntityInformation entityInformation)
 {
     PlayerDamageDealt = playerDamageDealt;
     PlayerHealDealt   = playerHealDealt;
     EntityInformation = entityInformation;
 }