From 71c4d56466bfcc4845fa5c45a2cee7c1103bd563 Mon Sep 17 00:00:00 2001 From: mgoeppner Date: Tue, 20 Dec 2022 11:41:24 +0100 Subject: [PATCH] Update booster calculations to play nicely with the fixed CurrentSP count. Calculates booster time and counts down correctly now! --- src/EVEMon.Common/Models/SkillQueue.cs | 2 +- src/EVEMon/CharacterMonitoring/CharacterMonitorFooter.cs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/EVEMon.Common/Models/SkillQueue.cs b/src/EVEMon.Common/Models/SkillQueue.cs index 897896592..1fce21d21 100644 --- a/src/EVEMon.Common/Models/SkillQueue.cs +++ b/src/EVEMon.Common/Models/SkillQueue.cs @@ -65,7 +65,7 @@ internal void Dispose() /// Gets the expected booster duration /// public TimeSpan BoosterDuration => !Items.Any() ? TimeSpan.Zero : TimeSpan.FromHours(Items.Select(i => { - var actualTime = i.EndTime.Subtract(i.StartTime); + var actualTime = i.RemainingTime; var expectedTime = m_character.GetTimeSpanForPointsWithoutBoosters(i.Skill.StaticData, i.Level); expectedTime = expectedTime.Subtract(TimeSpan.FromMilliseconds(expectedTime.Milliseconds)); diff --git a/src/EVEMon/CharacterMonitoring/CharacterMonitorFooter.cs b/src/EVEMon/CharacterMonitoring/CharacterMonitorFooter.cs index c2f282ebc..435329756 100644 --- a/src/EVEMon/CharacterMonitoring/CharacterMonitorFooter.cs +++ b/src/EVEMon/CharacterMonitoring/CharacterMonitorFooter.cs @@ -1,5 +1,6 @@ using System; using System.Drawing; +using System.Globalization; using System.Windows.Forms; using EVEMon.Common; using EVEMon.Common.Constants; @@ -170,7 +171,7 @@ private void UpdateTrainingSkillInfo() TimeSpan booster = ccpCharacter.SkillQueue.BoosterDuration; if (booster.TotalSeconds > 0) { - lblSPPerHour.Text += string.Format(", Booster Remaining: ~{0} hours", (int)booster.TotalHours); + lblSPPerHour.Text += string.Format(", Booster: ~{0}:{1}", (int)booster.TotalHours, booster.ToString("mm")); } // Do not show the "DOWNTIME" warning if character's skill queue has more than one skills