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

Commit

Permalink
fix: changed the way to get gcd time.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Jul 22, 2024
1 parent c3577a2 commit 2201ba5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ public override string DrawIndex(object obj, int index)
if (index == 0) _time = TimeSpan.Zero;

var result = $"{(int)_time.TotalMinutes}:{_time.Seconds:D2}.{_time.Milliseconds.ToString()[0]}";
var time = setting.GcdOverride == 0
? Plugin.Settings.RotationHelper.GcdTime
: setting.GcdOverride;

var recastTime = Svc.Data.GetExcelSheet<Action>()?.GetRow(setting.ActionId)?.Recast100ms ?? 0;

var time = Plugin.Settings.RotationHelper.GcdTime / 2.5f * recastTime / 10f;

_time = _time.Add(TimeSpan.FromSeconds(time));
return result;
Expand Down
16 changes: 8 additions & 8 deletions ActionTimelineEx/Configurations/Actions/GCDAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ public class GCDAction : ActionSetting
{
internal override ActionSettingType Type => ActionSettingType.Action;

[JsonIgnore]
[Range(0, 20, ConfigUnitType.Seconds)]
[UI("Recast time override")]
public float GcdOverride
{
get => Plugin.Settings.ActionRecast.TryGetValue(ActionId, out var v) ? v : 0f;
set => Plugin.Settings.ActionRecast[ActionId] = value;
}
//[JsonIgnore]
//[Range(0, 20, ConfigUnitType.Seconds)]
//[UI("Recast time override")]
//public float GcdOverride
//{
// get => Plugin.Settings.ActionRecast.TryGetValue(ActionId, out var v) ? v : 0f;
// set => Plugin.Settings.ActionRecast[ActionId] = value;
//}

[UI]
public List<oGCDAction> oGCDs { get; set; } = [];
Expand Down
2 changes: 1 addition & 1 deletion ActionTimelineEx/Configurations/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ internal RotationsSetting RotationHelper

private static readonly RotationsSetting EmptyHolder = new();

public Dictionary<uint, float> ActionRecast { get; set; } = [];
//public Dictionary<uint, float> ActionRecast { get; set; } = [];

public int Version { get; set; } = 6;

Expand Down

0 comments on commit 2201ba5

Please sign in to comment.