From 270c49a0031b342f8f14b0cee730d866e7bd88c9 Mon Sep 17 00:00:00 2001 From: LTS-FFXIV <127939494+LTS-FFXIV@users.noreply.github.com> Date: Fri, 4 Oct 2024 22:43:57 -0500 Subject: [PATCH] Update ECommons submodule and refactor Configs class Updated ECommons submodule to commit b39bbc68ff7ee632d3121388e6f4e4aad6753dcd. Removed several configuration options from the Configs class: - _changeTargetForFate - _useTasksForOverlay - _onlyHotOnTanks - _targetFatePriority Replaced ConditionBool attribute with JobConfig for: - _interruptibleMoreCheck - _raisePlayerByCasting - _raisePlayerBySwift - _raiseBrinkOfDeath Changed PvEFilter for _raisePlayerBySwift to JobFilterType.Raise. Removed condition checks in DataCenter.cs and ObjectHelper.cs. Removed VPR job condition checks in CustomRotation_Ability.cs for JobRole.Melee. Added feature in CheckBoxSearch.cs to draw job icon if IsJob is true. --- ECommons | 2 +- RotationSolver.Basic/Configuration/Configs.cs | 27 ++++--------------- RotationSolver.Basic/DataCenter.cs | 6 ++--- RotationSolver.Basic/Helpers/ObjectHelper.cs | 3 --- .../Rotations/CustomRotation_Ability.cs | 3 --- .../UI/SearchableConfigs/CheckBoxSearch.cs | 2 ++ 6 files changed, 11 insertions(+), 32 deletions(-) diff --git a/ECommons b/ECommons index 54e5dc1a5..b39bbc68f 160000 --- a/ECommons +++ b/ECommons @@ -1 +1 @@ -Subproject commit 54e5dc1a5c14bc0a625386cee48a8b3dfcb783c9 +Subproject commit b39bbc68ff7ee632d3121388e6f4e4aad6753dcd diff --git a/RotationSolver.Basic/Configuration/Configs.cs b/RotationSolver.Basic/Configuration/Configs.cs index c1c2be7bb..8d5d76369 100644 --- a/RotationSolver.Basic/Configuration/Configs.cs +++ b/RotationSolver.Basic/Configuration/Configs.cs @@ -66,10 +66,6 @@ public const string Filter = BasicAutoSwitch)] private static readonly bool _autoOffWhenDutyCompleted = true; - [ConditionBool, UI("Select only Fate targets in Fate", - Filter = TargetConfig, Section = 1)] - private static readonly bool _changeTargetForFate = true; - [ConditionBool, UI("Use movement actions towards the object/mob in the center of the screen", Description = "Use movement actions towards the object/mob in the center of the screen, otherwise toward object/mob your character is facing.", Filter = TargetConfig, Section = 2)] @@ -139,10 +135,6 @@ public const string [ConditionBool, UI("Teaching mode", Filter = UiInformation)] private static readonly bool _teachingMode = false; - //[ConditionBool, UI("Use task for overlay window.", - // Parent = nameof(TeachingMode))] - //private static readonly bool _useTasksForOverlay = false; - [ConditionBool, UI("Simulate the effect of pressing abilities", Filter = UiInformation)] private static readonly bool _keyBoardNoise = true; @@ -176,7 +168,7 @@ public const string Filter = TargetConfig, Section = 3)] private static readonly bool _switchTargetFriendly = false; - [ConditionBool, UI("Use interrupt abilities if possible.", + [JobConfig, UI("Use interrupt abilities if possible.", Filter = AutoActionUsage, Section = 3, PvEFilter = JobFilterType.Interrupt, PvPFilter = JobFilterType.NoJob)] @@ -202,11 +194,6 @@ public const string Filter = TargetConfig, Section = 1)] private static readonly bool _onlyAttackInVisionCone = false; - [ConditionBool, UI("Use single target healing over time actions only on tanks", - Filter = HealingActionCondition, Section = 1, - PvEFilter = JobFilterType.Healer, PvPFilter = JobFilterType.Healer)] - private static readonly bool _onlyHotOnTanks = false; - [ConditionBool, UI("Debug Mode", Filter = Debug)] private static readonly bool _inDebug = false; @@ -270,10 +257,6 @@ public const string Filter = UiInformation)] private static readonly bool _showTooltips = true; - [ConditionBool, UI("Target Fate priority", - Filter = TargetConfig, Section = 1)] - private static readonly bool _targetFatePriority = true; - [ConditionBool, UI("Target Hunt/Relic/Leve priority. (Relic behaviour bugged)", Filter = TargetConfig, Section = 1)] private static readonly bool _targetHuntingRelicLevePriority = true; @@ -410,14 +393,14 @@ public const string [Range(0, 1, ConfigUnitType.Percent, 0.02f)] public float HealthHealerRatio { get; set; } = 0.4f; - [ConditionBool, UI("Hard cast Raise players while Swiftcast is on cooldown", Description = "If this is enabled and Swiftcast is on cooldown, you will only attempt to raise while standing still.", + [JobConfig, UI("Hard cast Raise players while Swiftcast is on cooldown", Description = "If this is enabled and Swiftcast is on cooldown, you will only attempt to raise while standing still.", Filter = HealingActionCondition, Section = 2, PvEFilter = JobFilterType.Raise, PvPFilter = JobFilterType.NoJob)] private static readonly bool _raisePlayerByCasting = true; - [ConditionBool, UI("Raise player by using Swiftcast/Dualcast if avaliable", Description = "If this is disabled, you will never use Swiftcast/Dualcast to raise players.", + [JobConfig, UI("Raise player by using Swiftcast/Dualcast if avaliable", Description = "If this is disabled, you will never use Swiftcast/Dualcast to raise players.", Filter = HealingActionCondition, Section = 2, - PvEFilter = JobFilterType.None)] + PvEFilter = JobFilterType.Raise, PvPFilter = JobFilterType.NoJob)] private static readonly bool _raisePlayerBySwift = true; [JobConfig, UI("Raise styles", @@ -425,7 +408,7 @@ public const string PvEFilter = JobFilterType.Raise, PvPFilter = JobFilterType.NoJob)] private readonly RaiseType _RaiseType = RaiseType.PartyOnly; - [ConditionBool, UI("Raise players that have the Brink of Death debuff", + [JobConfig, UI("Raise players that have the Brink of Death debuff", Filter = HealingActionCondition, Section = 2, PvEFilter = JobFilterType.Raise, PvPFilter = JobFilterType.NoJob)] private static readonly bool _raiseBrinkOfDeath = true; diff --git a/RotationSolver.Basic/DataCenter.cs b/RotationSolver.Basic/DataCenter.cs index e084b0e88..3388ee100 100644 --- a/RotationSolver.Basic/DataCenter.cs +++ b/RotationSolver.Basic/DataCenter.cs @@ -202,9 +202,9 @@ public static unsafe ushort FateId { try { - if (Service.Config.ChangeTargetForFate && (IntPtr)FateManager.Instance() != IntPtr.Zero - && (IntPtr)FateManager.Instance()->CurrentFate != IntPtr.Zero - && Player.Level <= FateManager.Instance()->CurrentFate->MaxLevel) + if ((IntPtr)FateManager.Instance() != IntPtr.Zero + && (IntPtr)FateManager.Instance()->CurrentFate != IntPtr.Zero + && Player.Level <= FateManager.Instance()->CurrentFate->MaxLevel) { return FateManager.Instance()->CurrentFate->FateId; } diff --git a/RotationSolver.Basic/Helpers/ObjectHelper.cs b/RotationSolver.Basic/Helpers/ObjectHelper.cs index 6d6300b6e..0ee8b2e8e 100644 --- a/RotationSolver.Basic/Helpers/ObjectHelper.cs +++ b/RotationSolver.Basic/Helpers/ObjectHelper.cs @@ -304,9 +304,6 @@ internal static bool IsTopPriorityHostile(this IGameObject obj) if (Service.Config.ChooseAttackMark && MarkingHelper.AttackSignTargets.FirstOrDefault(id => id != 0) == (long)obj.GameObjectId) return true; - // Fate - if (Service.Config.TargetFatePriority && fateId != 0 && obj.FateId() == fateId) return true; - var icon = obj.GetNamePlateIcon(); // Hunting log and weapon diff --git a/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs b/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs index 269205dc5..790679974 100644 --- a/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs +++ b/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs @@ -214,7 +214,6 @@ private bool MyInterruptAbility(JobRole role, IAction nextGCD, out IAction? act) break; case JobRole.Melee: - if (Job == ECommons.ExcelServices.Job.VPR) break; if (LegSweepPvE.CanUse(out act)) return true; break; @@ -256,7 +255,6 @@ private bool AntiKnockback(JobRole role, IAction nextGCD, out IAction? act) { case JobRole.Tank: case JobRole.Melee: - if (Job == ECommons.ExcelServices.Job.VPR) break; if (ArmsLengthPvE.CanUse(out act)) return true; break; case JobRole.Healer: @@ -317,7 +315,6 @@ private bool GeneralUsingAbility(JobRole role, IAction nextGCD, out IAction? act break; case JobRole.Melee: - if (Job == ECommons.ExcelServices.Job.VPR) break; if (SecondWindPvE.CanUse(out act)) return true; if (BloodbathPvE.CanUse(out act)) return true; break; diff --git a/RotationSolver/UI/SearchableConfigs/CheckBoxSearch.cs b/RotationSolver/UI/SearchableConfigs/CheckBoxSearch.cs index dc2d2d77b..68ff8422a 100644 --- a/RotationSolver/UI/SearchableConfigs/CheckBoxSearch.cs +++ b/RotationSolver/UI/SearchableConfigs/CheckBoxSearch.cs @@ -245,5 +245,7 @@ protected override void DrawMain() ImGui.TextWrapped(Name); if (ImGui.IsItemHovered()) ShowTooltip(false); } + // Draw job icon if IsJob is true + if (IsJob) DrawJobIcon(); } }