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

Commit

Permalink
fix: add ignoreClipping check for actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Apr 21, 2023
1 parent eb794a4 commit 4ec1a3a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@

Download it at this url:

`https://raw.githubusercontent.com/ArchiDog1998/RotationSolver/main/pluginmaster.json`
```
https://raw.githubusercontent.com/ArchiDog1998/RotationSolver/main/pluginmaster.json
```

## Brief

Expand Down
2 changes: 1 addition & 1 deletion RotationSolver.Basic/Actions/BaseAction_ActionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public unsafe virtual bool CanUse(out IAction act, CanUseOption option = CanUseO
{
if (DataCenter.NextAbilityToNextGCD > AnimationLockTime + DataCenter.Ping + DataCenter.MinPing) return false;
}
else
else if (!option.HasFlag(CanUseOption.IgnoreClippingCheck))
{
if (DataCenter.NextAbilityToNextGCD < AnimationLockTime) return false;
}
Expand Down
5 changes: 5 additions & 0 deletions RotationSolver.Basic/Data/CanUseOption.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,9 @@ public enum CanUseOption : byte
/// On the last ability in one GCD.
/// </summary>
OnLastAbility = 1 << 5,

/// <summary>
/// Ignore clipping check for 0GCDs.
/// </summary>
IgnoreClippingCheck = 1 << 6,
}
4 changes: 2 additions & 2 deletions RotationSolver.Basic/Rotations/CustomRotation_Ability.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ private bool Ability(IAction nextGCD, out IAction act, bool helpDefenseAOE, bool

//Run!
if (!InCombat && IsMoving && role == JobRole.RangedPhysical
&& Peloton.CanUse(out act, CanUseOption.MustUse)) return true;
&& Peloton.CanUse(out act, CanUseOption.MustUse | CanUseOption.IgnoreClippingCheck)) return true;

return false;
}
Expand Down Expand Up @@ -90,7 +90,7 @@ private bool ShirkOrShield(JobRole role, SpecialCommandType specialType, out IAc

if (DataCenter.SetAutoStatus(AutoStatus.TankStance, Service.Config.GetValue(SettingsCommand.AutoTankStance)
&& !DataCenter.AllianceTanks.Any(t => t.CurrentHp != 0 && t.HasStatus(false, StatusHelper.TankStanceStatus))
&& !HasTankStance && TankStance.CanUse(out act)))
&& !HasTankStance && TankStance.CanUse(out act, CanUseOption.IgnoreClippingCheck)))
{
return true;
}
Expand Down

0 comments on commit 4ec1a3a

Please sign in to comment.