Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
fix: fixed special time calculating.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Apr 17, 2023
1 parent b9be467 commit e5ad840
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion RotationSolver.Basic/DataCenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ public static unsafe ushort FateId
public static uint[] BluSlots { get; set; } = new uint[24];

static DateTime _specialStateStartTime = DateTime.MinValue;
public static double SpecialTimeLeft => Service.Config.SpecialDuration + WeaponRemain - (DateTime.Now - _specialStateStartTime).TotalSeconds;
private static double SpecialTimeElapsed => (DateTime.Now - _specialStateStartTime).TotalSeconds;
public static double SpecialTimeLeft => WeaponTotal == 0 || WeaponElapsed == 0 ? Service.Config.SpecialDuration - SpecialTimeElapsed :
Math.Ceiling((Service.Config.SpecialDuration + WeaponElapsed - SpecialTimeElapsed) / WeaponTotal) * WeaponTotal - WeaponElapsed;

static SpecialCommandType _specialType = SpecialCommandType.EndSpecial;
public static SpecialCommandType SpecialType =>
Expand Down

0 comments on commit e5ad840

Please sign in to comment.