Skip to content

Commit

Permalink
Update booster calculations to play nicely with the fixed CurrentSP c…
Browse files Browse the repository at this point in the history
…ount.

Calculates booster time and counts down correctly now!
  • Loading branch information
mgoeppner committed Dec 20, 2022
1 parent bdc0bfe commit 71c4d56
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/EVEMon.Common/Models/SkillQueue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ internal void Dispose()
/// Gets the expected booster duration
/// </summary>
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));
Expand Down
3 changes: 2 additions & 1 deletion src/EVEMon/CharacterMonitoring/CharacterMonitorFooter.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Drawing;
using System.Globalization;
using System.Windows.Forms;
using EVEMon.Common;
using EVEMon.Common.Constants;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 71c4d56

Please sign in to comment.