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

Commit

Permalink
fix: add an OtherOption for control actions as whole.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Apr 22, 2023
1 parent d0439eb commit a24d670
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions RotationSolver.Basic/Actions/BaseAction_ActionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ private bool WillCooldown

public unsafe virtual bool CanUse(out IAction act, CanUseOption option = CanUseOption.None, byte gcdCountForAbility = 0)
{
option |= OtherOption;

act = this;
var mustUse = option.HasFlag(CanUseOption.MustUse);

Expand Down
2 changes: 2 additions & 0 deletions RotationSolver.Basic/Actions/BaseAction_BasicInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ namespace RotationSolver.Basic.Actions;

public partial class BaseAction : IBaseAction
{
internal static CanUseOption OtherOption { get; set; } = CanUseOption.None;

Action _action;
ActionOption _option;

Expand Down
3 changes: 3 additions & 0 deletions RotationSolver.Basic/Rotations/CustomRotation_Invoke.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,10 @@ private IAction Invoke(out IAction gcdAction)
}
else if (gcdAction == null)
{
BaseAction.OtherOption = CanUseOption.IgnoreClippingCheck;
if (Ability(Addle, out IAction ability, helpDefenseAOE, helpDefenseSingle)) return ability;
BaseAction.OtherOption = CanUseOption.None;

return null;
}
return gcdAction;
Expand Down

0 comments on commit a24d670

Please sign in to comment.