Handle Solution Nine aetheryte not working for aethernet shortcut usage
authorLiza Carvelli <liza@carvel.li>
Thu, 11 Jul 2024 11:00:47 +0000 (13:00 +0200)
committerLiza Carvelli <liza@carvel.li>
Thu, 11 Jul 2024 11:00:47 +0000 (13:00 +0200)
Questionable/Controller/Steps/BaseFactory/AethernetShortcut.cs

index f48dccb793571b0094022c3a5f08323e2d518c20..5bcd6349efad525d00101440c434b267e54fd27e 100644 (file)
@@ -1,4 +1,6 @@
 using System;
+using System.Collections.Generic;
+using System.Linq;
 using System.Numerics;
 using Dalamud.Plugin.Services;
 using Microsoft.Extensions.DependencyInjection;
@@ -66,6 +68,23 @@ internal static class AethernetShortcut
                         _teleported = true;
                         return true;
                     }
+                    else if (From == EAetheryteLocation.SolutionNine)
+                    {
+                        logger.LogInformation("Moving to S9 aetheryte");
+                        List<Vector3> nearbyPoints =
+                        [
+                            new(7.225532f, 8.467899f, -7.1670876f),
+                            new(7.177844f, 8.467899f, 7.2216787f),
+                            new(-7.0762224f, 8.467898f, 7.1924725f),
+                            new(-7.1289554f, 8.467898f, -7.0594683f)
+                        ];
+
+                        Vector3 closestPoint = nearbyPoints.MinBy(x => (playerPosition - x).Length());
+                        _moving = true;
+                        movementController.NavigateTo(EMovementType.Quest, (uint)From, closestPoint, false, true,
+                            0.25f);
+                        return true;
+                    }
                     else
                     {
                         logger.LogInformation("Moving to aethernet shortcut");