private void Parser_UpdateTick(object sender, UpdateTickEventArgs e)
 {
     App.Current.Dispatcher.Invoke(() =>
     {
         RefreshState();
     });
 }
Example #2
0
        private void Parser_UpdateTick(object sender, UpdateTickEventArgs e)
        {
            if (player == null || parser.NewDamageInstanceCount == 0)
            {
                return; //do nothing until damage starts, or damage actually occurs
            }
            //damage parser takes care of splitting up damages, so we can use player.FilteredDamage now
            long  totalDamage = player.FilteredDamage.TotalDamage;
            float totalDPS    = player.FilteredDamage.TotalDPS;
            float updateDPS   = player.FilteredDamage.UpdateDPS;

            totalDamageValues.Add(new ObservablePoint(e.ElapsedTime.TotalSeconds, totalDamage));
            totalDPSValues.Add(new ObservablePoint(e.ElapsedTime.TotalSeconds, totalDPS));
            totalDamageTakenValues.Add(new ObservablePoint(e.ElapsedTime.TotalSeconds, player.DamageTaken.TotalDamage));
            updateDPSValues.Add(new ObservablePoint(e.ElapsedTime.TotalSeconds, player.FilteredDamage.UpdateDPS));
            averageMPAValues.Add(new ObservablePoint(e.ElapsedTime.TotalSeconds, parser.TotalFriendlyDPS));
            if (player.DamageTaken.TotalDamage > 0)
            {
                DamageTakenScale = player.DamageTaken.TotalDamage * 1.1;                                     //extra padding up top
            }
            TabName = player.Name;

            App.Current.Dispatcher.Invoke(() =>
            {
                foreach (var curInfo in player.AttackInfoList)
                {
                    if (!detailedVMDict.ContainsKey(curInfo.Key))
                    {
                        var vmToAdd = new DetailedAttackInfoVM(this, curInfo.Value);
                        detailedVMDict.Add(curInfo.Key, vmToAdd);
                        _damageInfos.Add(vmToAdd);
                    }

                    detailedVMDict[curInfo.Key].Update();
                }

                DamageInfosView.Refresh();
            });
        }
Example #3
0
 private void Parser_UpdateTick(object sender, UpdateTickEventArgs e)
 {
     StatusBarText = $"{e.ElapsedTime.ToString(@"h\:mm\:ss")} - Total Damage : {CurrentDamageParser.TotalFriendlyDamage:#,##0} - {DamageParser.FormatDPSNumber(CurrentDamageParser.TotalFriendlyDPS)} DPS";
     App.Current.Dispatcher.Invoke(synchronizeTabState); //ew.
 }