Skip to content

Commit

Permalink
Merge pull request #336 from FFXIV-CombatReborn/MISC-enhancements
Browse files Browse the repository at this point in the history
Refactor CanUse method, update resources, and fix UI
  • Loading branch information
LTS-FFXIV authored Sep 6, 2024
2 parents cba68b2 + e92a88d commit bc328bb
Show file tree
Hide file tree
Showing 9 changed files with 216 additions and 185 deletions.
4 changes: 1 addition & 3 deletions RotationSolver.Basic/Actions/BaseItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public unsafe BaseItem(Item item)
/// <param name="item"></param>
/// <param name="clippingCheck"></param>
/// <returns></returns>
public virtual unsafe bool CanUse(out IAction item, bool clippingCheck = true)
public virtual unsafe bool CanUse(out IAction item, bool clippingCheck = false)
{
item = this;
if (_item == null) return false;
Expand All @@ -177,8 +177,6 @@ public virtual unsafe bool CanUse(out IAction item, bool clippingCheck = true)

if (remain > DataCenter.DefaultGCDRemain) return false;

if (clippingCheck && DataCenter.DefaultGCDRemain > 0) return false;

if (ItemCheck != null && !ItemCheck()) return false;

return HasIt;
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver.Basic/Actions/HpPotionItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ public override bool CanUse(out IAction item, bool clippingCheck)
if (!Player.Available) return false;
if (Player.Object.GetHealthRatio() > Service.Config.HealthSingleAbilityHot) return false;
if (Player.Object.MaxHp - Player.Object.CurrentHp < MaxHp) return false;
return base.CanUse(out item, clippingCheck);
return base.CanUse(out item);
}
}
2 changes: 1 addition & 1 deletion RotationSolver.Basic/Actions/IBaseItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ public interface IBaseItem : IAction
/// <param name="item"></param>
/// <param name="clippingCheck"></param>
/// <returns></returns>
bool CanUse(out IAction item, bool clippingCheck = true);
bool CanUse(out IAction item, bool clippingCheck = false);
}
2 changes: 1 addition & 1 deletion RotationSolver.Basic/Actions/MpPotionItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ public override bool CanUse(out IAction item, bool clippingCheck)
item = this;
if (!Player.Available) return false;
if (Player.Object.MaxMp - DataCenter.CurrentMp < MaxMp) return false;
return base.CanUse(out item, clippingCheck);
return base.CanUse(out item);
}
}
4 changes: 1 addition & 3 deletions RotationSolver.Basic/Rotations/Basic/ViperRotation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,6 @@ public partial class ViperRotation
static partial void ModifyWrithingSnapPvE(ref ActionSetting setting)
{
setting.SpecialType = SpecialActionType.MeleeRange;
setting.ActionCheck = () => SerpentCombo == SerpentCombo.NONE;

}

static partial void ModifySlitherPvE(ref ActionSetting setting)
Expand Down Expand Up @@ -409,7 +407,7 @@ static partial void ModifyTwinbloodThreshPvE(ref ActionSetting setting)

static partial void ModifyUncoiledFuryPvE(ref ActionSetting setting)
{
setting.ActionCheck = () => RattlingCoilStacks >= 1 && SerpentCombo == SerpentCombo.NONE;
setting.ActionCheck = () => RattlingCoilStacks >= 1;
setting.StatusProvide = [StatusID.PoisedForTwinfang];
setting.CreateConfig = () => new ActionConfig()
{
Expand Down
Loading

0 comments on commit bc328bb

Please sign in to comment.