From 7eb85dc7489201acbaedeb78a67f01a43084bff7 Mon Sep 17 00:00:00 2001 From: LTS-FFXIV <127939494+LTS-FFXIV@users.noreply.github.com> Date: Tue, 19 Nov 2024 11:07:08 -0600 Subject: [PATCH] Rename and update NPC Heal/Raise config setting Renamed `_friendlyPartyNPCHealRaise` to `_friendlyPartyNPCHealRaise2` and changed its default value from `true` to `false`. Updated the description to indicate that it is experimental and may cause issues in some fights. Updated all references in `DataCenter.cs`, `ObjectHelper.cs`, and `RotationConfigWindow.cs` to use the new setting name. Modified the UI text and button functionality in `RotationConfigWindow.cs` to reflect the new setting. --- RotationSolver.Basic/Configuration/Configs.cs | 4 ++-- RotationSolver.Basic/DataCenter.cs | 4 ++-- RotationSolver.Basic/Helpers/ObjectHelper.cs | 2 +- RotationSolver/UI/RotationConfigWindow.cs | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/RotationSolver.Basic/Configuration/Configs.cs b/RotationSolver.Basic/Configuration/Configs.cs index 31d899cf6..995a821d2 100644 --- a/RotationSolver.Basic/Configuration/Configs.cs +++ b/RotationSolver.Basic/Configuration/Configs.cs @@ -448,9 +448,9 @@ public const string Filter = HealingActionCondition, Section = 3)] private static readonly bool _friendlyBattleNPCHeal = false; - [ConditionBool, UI("Heal and raise Party NPCs.", + [ConditionBool, UI("Heal and raise Party NPCs. (Breaks some fights due to status weirdness)", Description = "Experimental, only enable as needed.", Filter = HealingActionCondition, Section = 3)] - private static readonly bool _friendlyPartyNPCHealRaise = true; + private static readonly bool _friendlyPartyNPCHealRaise2 = false; [ConditionBool, UI("Heal/Dance partner your chocobo", Description = "Experimental.", Filter = HealingActionCondition, Section = 3)] diff --git a/RotationSolver.Basic/DataCenter.cs b/RotationSolver.Basic/DataCenter.cs index 5aa266a9d..7dfc71e77 100644 --- a/RotationSolver.Basic/DataCenter.cs +++ b/RotationSolver.Basic/DataCenter.cs @@ -327,7 +327,7 @@ public unsafe static IBattleChara[] FriendlyNPCMembers get { // Check if the configuration setting is true - if (!Service.Config.FriendlyBattleNpcHeal && !Service.Config.FriendlyPartyNpcHealRaise) + if (!Service.Config.FriendlyBattleNpcHeal && !Service.Config.FriendlyPartyNpcHealRaise2) { return Array.Empty(); } @@ -449,7 +449,7 @@ public static IBattleChara? DeathTarget } // Check death in friendly NPC members - if (deathNPC.Any() && Service.Config.FriendlyPartyNpcHealRaise) + if (deathNPC.Any() && Service.Config.FriendlyPartyNpcHealRaise2) { var deathNPCT = deathNPC.GetJobCategory(JobRole.Tank).ToList(); var deathNPCH = deathNPC.GetJobCategory(JobRole.Healer).ToList(); diff --git a/RotationSolver.Basic/Helpers/ObjectHelper.cs b/RotationSolver.Basic/Helpers/ObjectHelper.cs index bb750b1df..431b78459 100644 --- a/RotationSolver.Basic/Helpers/ObjectHelper.cs +++ b/RotationSolver.Basic/Helpers/ObjectHelper.cs @@ -243,7 +243,7 @@ internal static bool IsParty(this IGameObject gameObject) // Accessing Player.Object and Svc.Party within the lock to ensure thread safety if (gameObject.GameObjectId == Player.Object?.GameObjectId) return true; if (Svc.Party.Any(p => p.GameObject?.GameObjectId == gameObject.GameObjectId)) return true; - if (Service.Config.FriendlyPartyNpcHealRaise && gameObject.GetBattleNPCSubKind() == BattleNpcSubKind.NpcPartyMember) return true; + if (Service.Config.FriendlyPartyNpcHealRaise2 && gameObject.GetBattleNPCSubKind() == BattleNpcSubKind.NpcPartyMember) return true; if (Service.Config.ChocoboPartyMember && gameObject.GetNameplateKind() == NameplateKind.PlayerCharacterChocobo) return true; if (Service.Config.FriendlyBattleNpcHeal && gameObject.GetNameplateKind() == NameplateKind.FriendlyBattleNPC) return true; diff --git a/RotationSolver/UI/RotationConfigWindow.cs b/RotationSolver/UI/RotationConfigWindow.cs index 818133b56..545226367 100644 --- a/RotationSolver/UI/RotationConfigWindow.cs +++ b/RotationSolver/UI/RotationConfigWindow.cs @@ -963,10 +963,10 @@ private void DrawAutoduty() } // Display the current NPC Heal/Raise Support status - ImGui.TextWrapped($"NPC Heal/Raise Support Enabled: {Service.Config.FriendlyPartyNpcHealRaise}"); + ImGui.TextWrapped($"NPC Heal/Raise Support Enabled: {Service.Config.FriendlyPartyNpcHealRaise2}"); if (ImGui.Button("Enable NPC Heal/Raise Support")) { - Service.Config.FriendlyPartyNpcHealRaise.Value = true; + Service.Config.FriendlyPartyNpcHealRaise2.Value = true; } ImGui.Spacing(); // Display the Auto Load Rotations status