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

Commit

Permalink
fix: better gcd value checking.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Jul 22, 2024
1 parent 2201ba5 commit 7710096
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ public override string DrawIndex(object obj, int index)

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

var time = Plugin.Settings.RotationHelper.GcdTime / 2.5f * recastTime / 10f;
var time = setting.GcdOverride == 0
? Plugin.Settings.RotationHelper.GcdTime / 2.5f * recastTime / 10f
: setting.GcdOverride;

_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 7710096

Please sign in to comment.