From 83aa98b9509ee9dd885ac67e6e33085e680d4fdb Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Tue, 19 Aug 2025 15:31:54 +0200 Subject: [PATCH] Set Wrath to auto-heal lowest to override possible manual configuration --- .../CombatModules/WrathComboModule.cs | 51 +++++++++++++++++-- 1 file changed, 48 insertions(+), 3 deletions(-) diff --git a/Questionable/Controller/CombatModules/WrathComboModule.cs b/Questionable/Controller/CombatModules/WrathComboModule.cs index 175fb109..81a10aa8 100644 --- a/Questionable/Controller/CombatModules/WrathComboModule.cs +++ b/Questionable/Controller/CombatModules/WrathComboModule.cs @@ -1,4 +1,5 @@ using System; +using System.Diagnostics.CodeAnalysis; using Dalamud.Game.ClientState.Objects.Types; using Dalamud.Plugin; using Dalamud.Plugin.Ipc; @@ -18,8 +19,9 @@ internal sealed class WrathComboModule : ICombatModule, IDisposable private readonly ICallGateSubscriber _test; private readonly ICallGateSubscriber _registerForLeaseWithCallback; private readonly ICallGateSubscriber _releaseControl; - private readonly ICallGateSubscriber _setAutoRotationState; - private readonly ICallGateSubscriber _setCurrentJobAutoRotationReady; + private readonly ICallGateSubscriber _setAutoRotationState; + private readonly ICallGateSubscriber _setAutoRotationConfigState; + private readonly ICallGateSubscriber _setCurrentJobAutoRotationReady; private readonly ICallGateProvider _callback; private Guid? _lease; @@ -34,6 +36,7 @@ internal sealed class WrathComboModule : ICombatModule, IDisposable pluginInterface.GetIpcSubscriber("WrathCombo.RegisterForLeaseWithCallback"); _releaseControl = pluginInterface.GetIpcSubscriber("WrathCombo.ReleaseControl"); _setAutoRotationState = pluginInterface.GetIpcSubscriber("WrathCombo.SetAutoRotationState"); + _setAutoRotationConfigState = pluginInterface.GetIpcSubscriber("WrathCombo.SetAutoRotationConfigState"); _setCurrentJobAutoRotationReady = pluginInterface.GetIpcSubscriber("WrathCombo.SetCurrentJobAutoRotationReady"); @@ -77,11 +80,19 @@ internal sealed class WrathComboModule : ICombatModule, IDisposable ESetResult currentJobSetForAutoRotation = _setCurrentJobAutoRotationReady.InvokeFunc(_lease.Value); if (!currentJobSetForAutoRotation.IsSuccess()) { - _logger.LogError("Unable to setr current job for autorotation"); + _logger.LogError("Unable to set current job for autorotation"); Stop(); return false; } + ESetResult healerRotationModeSet = _setAutoRotationConfigState.InvokeFunc(_lease.Value, + AutoRotationConfigOption.HealerRotationMode, HealerRotationMode.Lowest_Current); + if (!healerRotationModeSet.IsSuccess()) + { + _logger.LogError("Unable to configure healing priority for autorotation: {Result}", + healerRotationModeSet); + } + return true; } else @@ -137,6 +148,7 @@ internal sealed class WrathComboModule : ICombatModule, IDisposable } [PublicAPI] + [SuppressMessage("ReSharper", "InconsistentNaming")] public enum ESetResult { Okay = 0, @@ -150,6 +162,39 @@ internal sealed class WrathComboModule : ICombatModule, IDisposable InvalidConfiguration = 15, InvalidValue = 16, } + + [PublicAPI] + [SuppressMessage("ReSharper", "InconsistentNaming")] + public enum AutoRotationConfigOption + { + InCombatOnly = 0, + DPSRotationMode = 1, + HealerRotationMode = 2, + FATEPriority = 3, + QuestPriority = 4, + SingleTargetHPP = 5, + AoETargetHPP = 6, + SingleTargetRegenHPP = 7, + ManageKardia = 8, + AutoRez = 9, + AutoRezDPSJobs = 10, + AutoCleanse = 11, + IncludeNPCs = 12, + OnlyAttackInCombat = 13, + OrbwalkerIntegration = 14, + AutoRezOutOfParty = 15, + DPSAoETargets = 16, + SingleTargetExcogHPP = 17, + } + + [PublicAPI] + [SuppressMessage("ReSharper", "InconsistentNaming")] + public enum HealerRotationMode + { + Manual = 0, + Highest_Current = 1, + Lowest_Current = 2, + } } internal static class WrathResultExtensions -- 2.30.2