Fix MoveTo not working if you entered combat while trying to mount
authorLiza Carvelli <liza@carvel.li>
Mon, 17 Mar 2025 17:47:24 +0000 (18:47 +0100)
committerLiza Carvelli <liza@carvel.li>
Mon, 17 Mar 2025 18:37:56 +0000 (19:37 +0100)
Questionable/Controller/Steps/Common/Mount.cs
Questionable/Controller/Steps/Shared/MoveTo.cs

index 898ca14f3ec4185f2860f2891d81eaec01b4331b..b347a71f676e33c59b5fefc8961ec5eaf6e6952b 100644 (file)
@@ -80,7 +80,11 @@ internal static class Mount
                 return MountResult.WhenOutOfCombat;
         }
 
-        protected override bool Start() => EvaluateMountState() == MountResult.Mount;
+        protected override bool Start()
+        {
+            _mountTriggered = false;
+            return EvaluateMountState() == MountResult.Mount;
+        }
 
         public override ETaskResult Update()
         {
index 741c5433cd70a62c55311dd09dcdcbd36b297d22..c10cb29ef4e68f077a16f89c32278bfa5726a948 100644 (file)
@@ -248,6 +248,16 @@ internal static class MoveTo
                     else
                         return ETaskResult.TaskComplete;
                 }
+                else if (!_condition[ConditionFlag.Mounted] && _condition[ConditionFlag.InCombat] &&
+                         nestedExecutor is { Triggered: true, Executor: Mount.MountExecutor })
+                {
+                    // if the problem wasn't caused by combat, the normal mount retry should handle it
+                    _logger.LogDebug("Resetting mount trigger state");
+                    _nestedExecutor = nestedExecutor with { Triggered = false };
+
+                    // however, we're also explicitly ignoring combat here and walking away
+                    _startAction?.Invoke();
+                }
 
                 return ETaskResult.StillRunning;
             }