Daily quest updates
authorLiza Carvelli <liza@carvel.li>
Sat, 17 Aug 2024 20:09:47 +0000 (22:09 +0200)
committerLiza Carvelli <liza@carvel.li>
Sat, 17 Aug 2024 20:09:47 +0000 (22:09 +0200)
21 files changed:
GatheringPaths/5.x - Shadowbringers/The Rak'tika Greatwood/689__MIN.json
GatheringPaths/5.x - Shadowbringers/The Rak'tika Greatwood/694__BTN.json [new file with mode: 0644]
QuestPathGenerator/RoslynElements/SkipConditionsExtensions.cs
QuestPaths/4.x - Stormblood/Allied Societies/Ananta/Dailies/3045_Deep-rooted Problems.json
QuestPaths/4.x - Stormblood/Allied Societies/Ananta/Dailies/3045_Deep-rooted Problems.md [new file with mode: 0644]
QuestPaths/5.x - Shadowbringers/Allied Societies/Dwarves/Dailies/3905_The New Batch.json
QuestPaths/5.x - Shadowbringers/Allied Societies/Dwarves/Dailies/3906_The Telltale Axles.json
QuestPaths/5.x - Shadowbringers/Allied Societies/Qitari/Dailies/3808_A Touch of Home.json
QuestPaths/5.x - Shadowbringers/Allied Societies/Qitari/Dailies/3809_Mother's Recipe.json
QuestPaths/5.x - Shadowbringers/Allied Societies/Qitari/Dailies/3810_Power to the Vegetables.json
QuestPaths/6.x - Endwalker/Allied Societies/Loporrits/Dailies/4690_Dancing King.json
QuestPaths/6.x - Endwalker/Allied Societies/Loporrits/Dailies/4691_Pieces of You.json
QuestPaths/6.x - Endwalker/Allied Societies/Omicrons/Dailies/4610_A Brewing Reputation.json
QuestPaths/6.x - Endwalker/Allied Societies/Omicrons/Dailies/4611_Grounds for Improvement.json
QuestPaths/quest-v1.json
Questionable.Model/Questing/SkipAetheryteCondition.cs
Questionable/Controller/Steps/Interactions/UseItem.cs
Questionable/Controller/Steps/Shared/AetheryteShortcut.cs
Questionable/Controller/Steps/Shared/Craft.cs
Questionable/Controller/Steps/Shared/SkipCondition.cs
Questionable/Controller/Utils/QuestWorkUtils.cs

index 8d6f0db11e89ec930b72d462fc3c44e62d216616..49e072387ef19c6fbd3427ff6b4b841031cc0666 100644 (file)
@@ -4,7 +4,8 @@
   "Steps": [
     {
       "TerritoryId": 817,
-      "InteractionType": "None"
+      "InteractionType": "None",
+      "AetheryteShortcut": "Rak'tika - Slitherbough"
     }
   ],
   "Groups": [
diff --git a/GatheringPaths/5.x - Shadowbringers/The Rak'tika Greatwood/694__BTN.json b/GatheringPaths/5.x - Shadowbringers/The Rak'tika Greatwood/694__BTN.json
new file mode 100644 (file)
index 0000000..de354ef
--- /dev/null
@@ -0,0 +1,67 @@
+{
+  "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/GatheringPaths/gatheringlocation-v1.json",
+  "Author": "liza",
+  "Steps": [
+    {
+      "TerritoryId": 817,
+      "InteractionType": "None",
+      "AetheryteShortcut": "Rak'tika - Slitherbough"
+    }
+  ],
+  "Groups": [
+    {
+      "Nodes": [
+        {
+          "DataId": 33020,
+          "Locations": [
+            {
+              "Position": {
+                "X": 226.1767,
+                "Y": -20.10281,
+                "Z": 643.5543
+              },
+              "MinimumAngle": -50,
+              "MaximumAngle": 120
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "Nodes": [
+        {
+          "DataId": 33018,
+          "Locations": [
+            {
+              "Position": {
+                "X": 248.9525,
+                "Y": -17.98949,
+                "Z": 657.4498
+              },
+              "MinimumAngle": -55,
+              "MaximumAngle": 100,
+              "MinimumDistance": 1,
+              "MaximumDistance": 3
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "Nodes": [
+        {
+          "DataId": 33019,
+          "Locations": [
+            {
+              "Position": {
+                "X": 209.0277,
+                "Y": -25.56828,
+                "Z": 701.8604
+              }
+            }
+          ]
+        }
+      ]
+    }
+  ]
+}
index b53e02dd473d5f26376d2e923f2f8ff37454f3b1..87d5e0a26cc5b61e67293c91d39956e528ed13c5 100644 (file)
@@ -138,6 +138,8 @@ internal static class SkipConditionsExtensions
                             Assignment(nameof(SkipAetheryteCondition.RequiredQuestVariablesNotMet),
                                     skipAetheryteCondition.RequiredQuestVariablesNotMet,
                                     emptyAetheryte.RequiredQuestVariablesNotMet)
-                                .AsSyntaxNodeOrToken()))));
+                                .AsSyntaxNodeOrToken(),
+                            Assignment(nameof(skipAetheryteCondition.NearPosition), skipAetheryteCondition.NearPosition,
+                                emptyAetheryte.NearPosition).AsSyntaxNodeOrToken()))));
     }
 }
index 2ff0c26031e718699adc10ec2330d8f964fc0d74..aa9b8be26409f7de3913b9e77694b7fabfc8eb72 100644 (file)
@@ -1,7 +1,6 @@
 {
   "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
   "Author": "liza",
-  "Disabled": true,
   "QuestSequence": [
     {
       "Sequence": 0,
     {
       "Sequence": 1,
       "Steps": [
-
+        {
+          "DataId": 2009325,
+          "Position": {
+            "X": -606.1647,
+            "Y": 53.238647,
+            "Z": 233.26453
+          },
+          "TerritoryId": 612,
+          "InteractionType": "UseItem",
+          "ItemId": 2002433,
+          "Fly": true,
+          "RequiredQuestVariables": [
+            null,
+            [
+              {
+                "Low": 2
+              },
+              {
+                "Low": 3
+              }
+            ],
+            null,
+            null,
+            null,
+            null
+          ],
+          "CompletionQuestVariablesFlags": [
+            null,
+            null,
+            null,
+            null,
+            null,
+            64
+          ]
+        },
+        {
+          "DataId": 2009326,
+          "Position": {
+            "X": -619.31793,
+            "Y": 45.181885,
+            "Z": 267.81104
+          },
+          "TerritoryId": 612,
+          "InteractionType": "UseItem",
+          "ItemId": 2002433,
+          "Fly": true,
+          "RequiredQuestVariables": [
+            null,
+            [
+              {
+                "Low": 1
+              },
+              {
+                "Low": 2
+              }
+            ],
+            null,
+            null,
+            null,
+            null
+          ],
+          "CompletionQuestVariablesFlags": [
+            null,
+            null,
+            null,
+            null,
+            null,
+            32
+          ]
+        },
+        {
+          "DataId": 2009324,
+          "Position": {
+            "X": -631.70825,
+            "Y": 44.785156,
+            "Z": 306.14172
+          },
+          "TerritoryId": 612,
+          "InteractionType": "UseItem",
+          "ItemId": 2002433,
+          "Fly": true,
+          "RequiredQuestVariables": [
+            null,
+            [
+              {
+                "Low": 1
+              },
+              {
+                "Low": 3
+              }
+            ],
+            null,
+            null,
+            null,
+            null
+          ],
+          "CompletionQuestVariablesFlags": [
+            null,
+            null,
+            null,
+            null,
+            null,
+            128
+          ]
+        }
       ]
     },
     {
diff --git a/QuestPaths/4.x - Stormblood/Allied Societies/Ananta/Dailies/3045_Deep-rooted Problems.md b/QuestPaths/4.x - Stormblood/Allied Societies/Ananta/Dailies/3045_Deep-rooted Problems.md
new file mode 100644 (file)
index 0000000..2705adf
--- /dev/null
@@ -0,0 +1,6 @@
+```
+0 xx 0 0 0 0 | 2009324 2009325 2009326
+  33         |    x               x
+  34         |            x       x
+  35         |    x       x
+```
index d73c93ee27c15487ccaf444aab111d2432752634..737476bad80c9163655c37a2b0066608e4ba5d91 100644 (file)
@@ -1,7 +1,6 @@
 {
   "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
   "Author": "liza",
-  "Disabled": true,
   "QuestSequence": [
     {
       "Sequence": 0,
     {
       "Sequence": 1,
       "Steps": [
-
-
+        {
+          "DataId": 2011178,
+          "Position": {
+            "X": -267.5365,
+            "Y": 14.389221,
+            "Z": -191.63806
+          },
+          "TerritoryId": 813,
+          "InteractionType": "Interact",
+          "Fly": true,
+          "CompletionQuestVariablesFlags": [
+            null,
+            null,
+            null,
+            null,
+            null,
+            64
+          ]
+        },
+        {
+          "DataId": 2011177,
+          "Position": {
+            "X": -236.13336,
+            "Y": 21.042175,
+            "Z": -223.0412
+          },
+          "TerritoryId": 813,
+          "InteractionType": "Interact",
+          "Fly": true,
+          "CompletionQuestVariablesFlags": [
+            null,
+            null,
+            null,
+            null,
+            null,
+            128
+          ]
+        }
       ]
     },
     {
index d73c93ee27c15487ccaf444aab111d2432752634..1e279138af086deb3a11034f87b11180133966c3 100644 (file)
     {
       "Sequence": 1,
       "Steps": [
-
-
+        {
+          "DataId": 1033767,
+          "Position": {
+            "X": -608.6061,
+            "Y": 65.60222,
+            "Z": -431.81506
+          },
+          "TerritoryId": 813,
+          "InteractionType": "Interact"
+        }
+      ]
+    },
+    {
+      "Sequence": 2,
+      "Steps": [
+        {
+          "TerritoryId": 813,
+          "InteractionType": "Craft",
+          "ItemId": 31153,
+          "ItemCount": 3
+        },
+        {
+          "DataId": 1034112,
+          "Position": {
+            "X": 115.983765,
+            "Y": 106.73271,
+            "Z": -551.7815
+          },
+          "TerritoryId": 813,
+          "InteractionType": "Interact"
+        }
       ]
     },
     {
@@ -45,6 +74,7 @@
           },
           "TerritoryId": 813,
           "InteractionType": "WalkTo",
+          "AetheryteShortcut": "Lakeland - Ostall Imperative",
           "Fly": true
         },
         {
index 5fb2d6da2973b01ee9bdbd58f33a10fc0d1d618f..5f67cc1dc1583ca5a809e22eadd11afdd5dcb2a2 100644 (file)
@@ -1,7 +1,6 @@
 {
   "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
   "Author": "liza",
-  "Disabled": true,
   "QuestSequence": [
     {
       "Sequence": 0,
index 5b359ba6175d7c76ae32ce0af1389fab4e555142..158b910043a5c25f6092a0e6e01fe235377f8b39 100644 (file)
@@ -1,7 +1,6 @@
 {
   "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
   "Author": "liza",
-  "Disabled": true,
   "QuestSequence": [
     {
       "Sequence": 0,
           "AetheryteShortcut": "Rak'tika - Fanow",
           "Fly": true,
           "RequiredGatheredItems": [
-
-
-
+            {
+              "QuestAcceptedAsClass": "Miner",
+              "ItemId": 29520,
+              "ItemCount": 3
+            },
+            {
+              "QuestAcceptedAsClass": "Botanist",
+              "ItemId": 29546,
+              "ItemCount": 3
+            }
           ]
         },
         {
index 5b359ba6175d7c76ae32ce0af1389fab4e555142..e7718bebf923e0048376a18e5842131db19a10ce 100644 (file)
@@ -1,7 +1,6 @@
 {
   "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
   "Author": "liza",
-  "Disabled": true,
   "QuestSequence": [
     {
       "Sequence": 0,
         }
       ]
     },
+    {
+      "Sequence": 1,
+      "Steps": [
+        {
+          "DataId": 2010995,
+          "Position": {
+            "X": -73.99103,
+            "Y": -19.36377,
+            "Z": 298.8479
+          },
+          "TerritoryId": 817,
+          "InteractionType": "UseItem",
+          "ItemId": 2002977,
+          "AetheryteShortcut": "Rak'tika - Slitherbough",
+          "CompletionQuestVariablesFlags": [
+            null,
+            null,
+            null,
+            null,
+            null,
+            64
+          ]
+        },
+        {
+          "DataId": 2010994,
+          "Position": {
+            "X": -69.13867,
+            "Y": -19.485779,
+            "Z": 294.14807
+          },
+          "TerritoryId": 817,
+          "InteractionType": "UseItem",
+          "ItemId": 2002977,
+          "CompletionQuestVariablesFlags": [
+            null,
+            null,
+            null,
+            null,
+            null,
+            128
+          ]
+        }
+      ]
+    },
+    {
+      "Sequence": 2,
+      "Steps": [
+        {
+          "DataId": 1027741,
+          "Position": {
+            "X": -80.338745,
+            "Y": -19.101032,
+            "Z": 299.82446
+          },
+          "TerritoryId": 817,
+          "InteractionType": "Interact"
+        }
+      ]
+    },
     {
       "Sequence": 255,
       "Steps": [
index d731dcbc44163da03f6cda727ee49640091504f0..52a51a21bf7054cf189fca124f3595572cbeaa03 100644 (file)
@@ -1,7 +1,6 @@
 {
   "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
   "Author": "liza",
-  "Disabled": true,
   "QuestSequence": [
     {
       "Sequence": 0,
     {
       "Sequence": 1,
       "Steps": [
+        {
+          "DataId": 1044567,
+          "Position": {
+            "X": -17.502136,
+            "Y": -47.192066,
+            "Z": -528.03845
+          },
+          "TerritoryId": 959,
+          "InteractionType": "Interact",
+          "Fly": true
+        }
+      ]
+    },
+    {
+      "Sequence": 2,
+      "Steps": [
+        {
+          "DataId": 1044568,
+          "Position": {
+            "X": -188.09796,
+            "Y": -49.14971,
+            "Z": -252.70471
+          },
+          "TerritoryId": 959,
+          "InteractionType": "Emote",
+          "Emote": "dance",
+          "Fly": true
+        }
+      ]
+    },
+    {
+      "Sequence": 3,
+      "Steps": [
+        {
+          "DataId": 1044568,
+          "Position": {
+            "X": -188.09796,
+            "Y": -49.14971,
+            "Z": -252.70471
+          },
+          "TerritoryId": 959,
+          "InteractionType": "Emote",
+          "Emote": "dance"
+        }
       ]
     },
     {
index d731dcbc44163da03f6cda727ee49640091504f0..f42e401c02aa50f5f4b3b4ab45084b629303f861 100644 (file)
     {
       "Sequence": 1,
       "Steps": [
+        {
+          "DataId": 1044573,
+          "Position": {
+            "X": 487.23572,
+            "Y": -163.52985,
+            "Z": -600.5188
+          },
+          "TerritoryId": 959,
+          "InteractionType": "Interact",
+          "AetheryteShortcut": "Mare Lamentorum - Bestways Burrow",
+          "Fly": true
+        }
+      ]
+    },
+    {
+      "Sequence": 2,
+      "Steps": [
+        {
+          "TerritoryId": 959,
+          "InteractionType": "Craft",
+          "ItemId": 38859,
+          "ItemCount": 3
+        },
+        {
+          "DataId": 1044573,
+          "Position": {
+            "X": 487.23572,
+            "Y": -163.52985,
+            "Z": -600.5188
+          },
+          "TerritoryId": 959,
+          "InteractionType": "Interact"
+        }
       ]
     },
     {
@@ -42,7 +75,9 @@
             "Z": -273.68756
           },
           "TerritoryId": 959,
-          "InteractionType": "WalkTo"
+          "InteractionType": "WalkTo",
+          "AetheryteShortcut": "Mare Lamentorum - Bestways Burrow",
+          "Fly": true
         },
         {
           "DataId": 1044403,
index 368803c3a19791715512352b1bc354aae46c2b63..1e9036a21e2a1f3b8dbe08769834afcf4edf89d3 100644 (file)
@@ -1,7 +1,6 @@
 {
   "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
   "Author": "liza",
-  "Disabled": true,
   "QuestSequence": [
     {
       "Sequence": 0,
         }
       ]
     },
+    {
+      "Sequence": 1,
+      "Steps": [
+        {
+          "DataId": 1044046,
+          "Position": {
+            "X": -585.3514,
+            "Y": 74.4431,
+            "Z": 238.33057
+          },
+          "StopDistance": 9,
+          "TerritoryId": 960,
+          "InteractionType": "Interact",
+          "AetheryteShortcut": "Ultima Thule - Reah Tahra",
+          "RequiredQuestVariables": [
+            null,
+            null,
+            [
+              {
+                "High": 1
+              },
+              {
+                "High": 3
+              }
+            ],
+            null,
+            null,
+            null
+          ],
+          "CompletionQuestVariablesFlags": [
+            null,
+            null,
+            null,
+            null,
+            null,
+            64
+          ],
+          "SkipConditions": {
+            "AetheryteShortcutIf": {
+              "RequiredQuestVariablesNotMet": true
+            }
+          }
+        },
+        {
+          "DataId": 1044047,
+          "Position": {
+            "X": 36.66736,
+            "Y": 269.16718,
+            "Z": -627.83246
+          },
+          "TerritoryId": 960,
+          "InteractionType": "Interact",
+          "AetheryteShortcut": "Ultima Thule - Abode of the Ea",
+          "RequiredQuestVariables": [
+            null,
+            null,
+            [
+              {
+                "High": 2
+              },
+              {
+                "High": 3
+              }
+            ],
+            null,
+            null,
+            null
+          ],
+          "CompletionQuestVariablesFlags": [
+            null,
+            null,
+            null,
+            null,
+            null,
+            32
+          ],
+          "SkipConditions": {
+            "AetheryteShortcutIf": {
+              "RequiredQuestVariablesNotMet": true
+            }
+          }
+        },
+        {
+          "DataId": 1044045,
+          "Position": {
+            "X": 510.64307,
+            "Y": 436.9999,
+            "Z": 332.41772
+          },
+          "TerritoryId": 960,
+          "InteractionType": "Interact",
+          "AetheryteShortcut": "Ultima Thule - Base Omicron",
+          "RequiredQuestVariables": [
+            null,
+            null,
+            [
+              {
+                "High": 1
+              },
+              {
+                "High": 2
+              }
+            ],
+            null,
+            null,
+            null
+          ],
+          "CompletionQuestVariablesFlags": [
+            null,
+            null,
+            null,
+            null,
+            null,
+            128
+          ]
+        }
+      ]
+    },
     {
       "Sequence": 255,
       "Steps": [
+        {
+          "DataId": 2013072,
+          "Position": {
+            "X": 456.65674,
+            "Y": 438.04077,
+            "Z": 310.2312
+          },
+          "TerritoryId": 960,
+          "InteractionType": "Interact",
+          "TargetTerritoryId": 960,
+          "AetheryteShortcut": "Ultima Thule - Base Omicron",
+          "SkipConditions": {
+            "AetheryteShortcutIf": {
+              "NearPosition": {
+                "Position": {
+                  "X": 489.2804,
+                  "Y": 437.5829,
+                  "Z": 333.63843
+                },
+                "MaximumDistance": 100
+              }
+            }
+          }
+        },
         {
           "DataId": 1043417,
           "Position": {
index 368803c3a19791715512352b1bc354aae46c2b63..9b34e831504f89f774b2006ab1803505d09a1c7e 100644 (file)
@@ -1,7 +1,6 @@
 {
   "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
   "Author": "liza",
-  "Disabled": true,
   "QuestSequence": [
     {
       "Sequence": 0,
         }
       ]
     },
+    {
+      "Sequence": 1,
+      "Steps": [
+        {
+          "TerritoryId": 960,
+          "InteractionType": "None",
+          "RequiredGatheredItems": [
+            {
+              "QuestAcceptedAsClass": "Miner",
+              "ItemId": 38284,
+              "ItemCount": 3
+            },
+            {
+              "QuestAcceptedAsClass": "Botanist",
+              "ItemId": 38308,
+              "ItemCount": 3
+            }
+          ]
+        },
+        {
+          "DataId": 1043421,
+          "Position": {
+            "X": 2.4261475,
+            "Y": 499.87805,
+            "Z": 46.036377
+          },
+          "TerritoryId": 1073,
+          "InteractionType": "Interact",
+          "TargetTerritoryId": 960
+        },
+        {
+          "DataId": 1043865,
+          "Position": {
+            "X": 301.8081,
+            "Y": 482.13644,
+            "Z": 165.02625
+          },
+          "TerritoryId": 960,
+          "InteractionType": "Interact",
+          "TargetTerritoryId": 960
+        },
+        {
+          "DataId": 1043936,
+          "Position": {
+            "X": 194.56775,
+            "Y": 567.4998,
+            "Z": 250.93457
+          },
+          "TerritoryId": 960,
+          "InteractionType": "Interact"
+        }
+      ]
+    },
     {
       "Sequence": 255,
       "Steps": [
+        {
+          "DataId": 1043864,
+          "Position": {
+            "X": 244.83093,
+            "Y": 564.8203,
+            "Z": 261.76843
+          },
+          "TerritoryId": 960,
+          "InteractionType": "Interact",
+          "TargetTerritoryId": 960
+        },
         {
           "DataId": 1043417,
           "Position": {
index 3b1f5c7b534f2e22048744ca4a052d4c735c057e..93250092fecda3061cb1629e08453f23b0df7a3d 100644 (file)
                 },
                 "RequiredQuestVariablesNotMet": {
                   "type": "boolean"
+                },
+                "NearPosition": {
+                  "type": "object",
+                  "properties": {
+                    "Position": {
+                      "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-schema.json#/$defs/Vector3"
+                    },
+                    "MaximumDistance": {
+                      "type": "number"
+                    }
+                  },
+                  "required": [
+                    "Position",
+                    "MaximumDistance"
+                  ],
+                  "additionalProperties": false
                 }
               },
               "additionalProperties": false
index 383b57b79e2d5f17f1339d2f4bc822c0dcf4605a..573c3e2ec5b65155bf34752a79c1b412a6375899 100644 (file)
@@ -11,4 +11,5 @@ public sealed class SkipAetheryteCondition
     public EAetheryteLocation? AetheryteLocked { get; set; }
     public EAetheryteLocation? AetheryteUnlocked { get; set; }
     public bool RequiredQuestVariablesNotMet { get; set; }
+    public NearPositionCondition? NearPosition { get; set; }
 }
index ead2209882572a6248ef1fc373160b3c4b2edbee..04e75c7876ba48d4234f4e634c76738a5fe516b6 100644 (file)
@@ -108,7 +108,7 @@ internal static class UseItem
             ushort territoryId = 129;
             Vector3 destination = new(-360.9217f, 8f, 38.92566f);
             yield return serviceProvider.GetRequiredService<AetheryteShortcut.UseAetheryteShortcut>()
-                .With(null, EAetheryteLocation.Limsa, territoryId);
+                .With(null, null, EAetheryteLocation.Limsa, territoryId);
             yield return serviceProvider.GetRequiredService<AethernetShortcut.UseAethernetShortcut>()
                 .With(EAetheryteLocation.Limsa, EAetheryteLocation.LimsaArcanist);
             yield return serviceProvider.GetRequiredService<WaitAtEnd.WaitDelay>();
index 59cd75f3ca2a3e2b3ebb7a2572fe37e2f2da3f2c..e48aaec63bef660bc7931253b780846bde9c51e5 100644 (file)
@@ -2,9 +2,11 @@
 using System.Collections.Generic;
 using System.Numerics;
 using Dalamud.Plugin.Services;
+using FFXIVClientStructs.FFXIV.Application.Network.WorkDefinitions;
 using Microsoft.Extensions.DependencyInjection;
 using Microsoft.Extensions.Logging;
 using Questionable.Controller.Steps.Common;
+using Questionable.Controller.Utils;
 using Questionable.Data;
 using Questionable.Functions;
 using Questionable.Model;
@@ -25,13 +27,15 @@ internal static class AetheryteShortcut
                 return null;
 
             return serviceProvider.GetRequiredService<UseAetheryteShortcut>()
-                .With(step, step.AetheryteShortcut.Value, aetheryteData.TerritoryIds[step.AetheryteShortcut.Value]);
+                .With(step, quest.Id, step.AetheryteShortcut.Value,
+                    aetheryteData.TerritoryIds[step.AetheryteShortcut.Value]);
         }
     }
 
     internal sealed class UseAetheryteShortcut(
         ILogger<UseAetheryteShortcut> logger,
         AetheryteFunctions aetheryteFunctions,
+        QuestFunctions questFunctions,
         IClientState clientState,
         IChatGui chatGui,
         AetheryteData aetheryteData) : ISkippableTask
@@ -40,6 +44,7 @@ internal static class AetheryteShortcut
         private DateTime _continueAt;
 
         public QuestStep? Step { get; set; }
+        public ElementId? ElementId { get; set; }
         public EAetheryteLocation TargetAetheryte { get; set; }
 
         /// <summary>
@@ -48,9 +53,11 @@ internal static class AetheryteShortcut
         /// </summary>
         public ushort ExpectedTerritoryId { get; set; }
 
-        public ITask With(QuestStep? step, EAetheryteLocation targetAetheryte, ushort expectedTerritoryId)
+        public ITask With(QuestStep? step, ElementId? elementId, EAetheryteLocation targetAetheryte,
+            ushort expectedTerritoryId)
         {
             Step = step;
+            ElementId = elementId;
             TargetAetheryte = targetAetheryte;
             ExpectedTerritoryId = expectedTerritoryId;
             return this;
@@ -102,6 +109,30 @@ internal static class AetheryteShortcut
                         logger.LogInformation("Skipping aetheryte teleport due to SkipCondition (AetheryteUnlocked)");
                         return true;
                     }
+
+                    if (ElementId != null)
+                    {
+                        QuestProgressInfo? questWork = questFunctions.GetQuestProgressInfo(ElementId);
+                        if (skipConditions.RequiredQuestVariablesNotMet &&
+                            questWork != null &&
+                            !QuestWorkUtils.MatchesRequiredQuestWorkConfig(Step.RequiredQuestVariables, questWork,
+                                logger))
+                        {
+                            logger.LogInformation("Skipping aetheryte teleport, as required variables do not match");
+                            return true;
+                        }
+                    }
+
+
+
+                    if (skipConditions.NearPosition is { } nearPosition && clientState.TerritoryType == Step.TerritoryId)
+                    {
+                        if (Vector3.Distance(nearPosition.Position, clientState.LocalPlayer!.Position) <= nearPosition.MaximumDistance)
+                        {
+                            logger.LogInformation("Skipping aetheryte shortcut, as we're near the position");
+                            return true;
+                        }
+                    }
                 }
 
                 if (ExpectedTerritoryId == territoryType)
@@ -139,7 +170,6 @@ internal static class AetheryteShortcut
 
         private bool DoTeleport()
         {
-
             if (!aetheryteFunctions.CanTeleport(TargetAetheryte))
             {
                 if (!aetheryteFunctions.IsTeleportUnlocked())
index 2aeff8642f7531931d024f6d65ced2f3bf774773..92487f6747ca01874a1bb9c32bb5c6254ab6ed6a 100644 (file)
@@ -121,7 +121,7 @@ internal static class Craft
                     if (addon != null)
                     {
                         logger.LogInformation("Closing crafting window");
-                        addon->Close(true);
+                        addon->FireCallbackInt(-1);
                         return ETaskResult.TaskComplete;
                     }
                 }
index eed128c5b2e19edcef02e0cf09d7f7c3313c2b92..69d441490482d0b208137ae519f742bc0d275dae 100644 (file)
@@ -174,19 +174,17 @@ internal static class SkipCondition
                 return true;
             }
 
-            if (ElementId is QuestId || ElementId is LeveId)
+            QuestProgressInfo? questWork = questFunctions.GetQuestProgressInfo(ElementId);
+            if (questWork != null)
             {
-                QuestProgressInfo? questWork = questFunctions.GetQuestProgressInfo(ElementId);
-                if (QuestWorkUtils.HasCompletionFlags(Step.CompletionQuestVariablesFlags) && questWork != null)
+                if (QuestWorkUtils.HasCompletionFlags(Step.CompletionQuestVariablesFlags) &&
+                    QuestWorkUtils.MatchesQuestWork(Step.CompletionQuestVariablesFlags, questWork))
                 {
-                    if (QuestWorkUtils.MatchesQuestWork(Step.CompletionQuestVariablesFlags, questWork))
-                    {
-                        logger.LogInformation("Skipping step, as quest variables match (step is complete)");
-                        return true;
-                    }
+                    logger.LogInformation("Skipping step, as quest variables match (step is complete)");
+                    return true;
                 }
 
-                if (Step is { SkipConditions.StepIf: { } conditions } && questWork != null)
+                if (Step is { SkipConditions.StepIf: { } conditions })
                 {
                     if (QuestWorkUtils.MatchesQuestWork(conditions.CompletionQuestVariablesFlags, questWork))
                     {
@@ -195,7 +193,7 @@ internal static class SkipCondition
                     }
                 }
 
-                if (Step is { RequiredQuestVariables: { } requiredQuestVariables } && questWork != null)
+                if (Step is { RequiredQuestVariables: { } requiredQuestVariables })
                 {
                     if (!QuestWorkUtils.MatchesRequiredQuestWorkConfig(requiredQuestVariables, questWork, logger))
                     {
index 4af3c90294820f40e1a8e2ad7d6964821ea10712..56484ecc715ca7d9a171636e58eb92d1c84f7dfd 100644 (file)
@@ -1,9 +1,7 @@
 using System;
 using System.Collections.Generic;
 using System.Linq;
-using FFXIVClientStructs.FFXIV.Application.Network.WorkDefinitions;
 using Microsoft.Extensions.Logging;
-using Questionable.Controller.Steps.Shared;
 using Questionable.Model;
 using Questionable.Model.Questing;
 
@@ -61,7 +59,7 @@ internal static class QuestWorkUtils
     }
 
     public static bool MatchesRequiredQuestWorkConfig(List<List<QuestWorkValue>?> requiredQuestVariables,
-        QuestProgressInfo questWork, ILogger<SkipCondition.CheckSkip> logger)
+        QuestProgressInfo questWork, ILogger logger)
     {
         if (requiredQuestVariables.Count != 6 || requiredQuestVariables.All(x => x == null || x.Count == 0))
         {