From 0cc9f81dc603630f0eb58b5457f45152fe590249 Mon Sep 17 00:00:00 2001 From: Kiyazasu Date: Tue, 17 Apr 2018 10:46:54 +0800 Subject: [PATCH] Display total damage did not include zanverse damage when split --- OverParse/Log.cs | 2 +- OverParse/MainWindow.xaml.cs | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/OverParse/Log.cs b/OverParse/Log.cs index 1c47612..cc1ac8b 100644 --- a/OverParse/Log.cs +++ b/OverParse/Log.cs @@ -157,7 +157,7 @@ public string WriteLog() // Logging the total time occured through out the encounter string totalDamage = combatants.Sum(x => x.Damage).ToString("N0"); string timer = timespan.ToString(@"mm\:ss"); - string log = DateTime.Now.ToString("F") + " | " + timer + " | Total Damage : " + totalDamage + " dmg" + Environment.NewLine + Environment.NewLine; + string log = DateTime.Now.ToString("F") + " | " + timer + " | Total Damage: " + totalDamage + " dmg" + Environment.NewLine + Environment.NewLine; log += "[ Encounter Overview ]" + Environment.NewLine; // Title diff --git a/OverParse/MainWindow.xaml.cs b/OverParse/MainWindow.xaml.cs index 356cd3b..daca5a7 100644 --- a/OverParse/MainWindow.xaml.cs +++ b/OverParse/MainWindow.xaml.cs @@ -597,7 +597,8 @@ public void UpdateForm(object sender, EventArgs e) } // get group damage totals - int totalReadDamage = workingList.Where(c => (c.IsAlly)).Sum(x => x.ReadDamage); + int totalDamage = workingList.Sum(x => x.Damage); + int totalReadDamage = workingList.Sum(x => x.ReadDamage); // dps calcs! foreach (Combatant c in workingList) @@ -667,10 +668,10 @@ public void UpdateForm(object sender, EventArgs e) string timer = timespan.ToString(@"h\:mm\:ss"); EncounterStatus.Content = $"{timer}"; - float totalDPS = totalReadDamage / (float)elapsed; + float totalDPS = totalDamage / (float)elapsed; if (totalDPS > 0) - EncounterStatus.Content += $" - Total : {totalReadDamage.ToString("N0")}" + $" - {totalDPS.ToString("N0")} DPS"; + EncounterStatus.Content += $" - Total : {totalDamage.ToString("N0")}" + $" - {totalDPS.ToString("N0")} DPS"; if (!Properties.Settings.Default.SeparateZanverse) EncounterStatus.Content += $" - Zanverse : {totalZanverse.ToString("N0")}";