Studium MIN/BTN deliveries
authorLiza Carvelli <liza@carvel.li>
Sat, 3 Aug 2024 17:12:34 +0000 (19:12 +0200)
committerLiza Carvelli <liza@carvel.li>
Sat, 3 Aug 2024 17:12:34 +0000 (19:12 +0200)
17 files changed:
GatheringPaths/4.x - Stormblood/.gitkeep [deleted file]
GatheringPaths/4.x - Stormblood/The Ruby Sea/487_Hells' Lid_MIN.json [new file with mode: 0644]
GatheringPaths/6.x - Endwalker/Elpis/823_The Hungering Gardens_MIN.json [new file with mode: 0644]
GatheringPaths/6.x - Endwalker/Garlemald/822_Monitoring Station G_MIN.json
GatheringPaths/6.x - Endwalker/Labyrinthos/816_Lower Acrinthos_MIN.json [new file with mode: 0644]
GatheringPaths/6.x - Endwalker/Mare Lamentorum/821_The Crushing Brand_MIN.json
GatheringPaths/6.x - Endwalker/Thavnair/820_The Hamsa Hatchery_MIN.json
GatheringPaths/7.x - Dawntrail/Urqopacha/974_Chabameki_MIN.json
GatheringPaths/7.x - Dawntrail/Urqopacha/992_Chabameki_BTN.json
GatheringPaths/7.x - Dawntrail/Urqopacha/993_Chabayuqeq_MIN.json
QuestPaths/6.x - Endwalker/Studium Deliveries/MIN, BTN/4157_Hinageshi in Hingashi.json
QuestPaths/6.x - Endwalker/Studium Deliveries/MIN, BTN/4158_The Culture of the Past.json [new file with mode: 0644]
QuestPaths/6.x - Endwalker/Studium Deliveries/MIN, BTN/4159_The Culture of Love.json [new file with mode: 0644]
Questionable/Controller/GatheringController.cs
Questionable/Controller/Steps/Gathering/DoGather.cs
Questionable/Controller/Steps/Gathering/DoGatherCollectable.cs
Questionable/Controller/Steps/Shared/GatheringRequiredItems.cs

diff --git a/GatheringPaths/4.x - Stormblood/.gitkeep b/GatheringPaths/4.x - Stormblood/.gitkeep
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/GatheringPaths/4.x - Stormblood/The Ruby Sea/487_Hells' Lid_MIN.json b/GatheringPaths/4.x - Stormblood/The Ruby Sea/487_Hells' Lid_MIN.json
new file mode 100644 (file)
index 0000000..47a321d
--- /dev/null
@@ -0,0 +1,108 @@
+{
+  "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/GatheringPaths/gatheringlocation-v1.json",
+  "Author": "liza",
+  "TerritoryId": 613,
+  "AetheryteShortcut": "Ruby Sea - Onokoro",
+  "Groups": [
+    {
+      "Nodes": [
+        {
+          "DataId": 32140,
+          "Locations": [
+            {
+              "Position": {
+                "X": 210.5032,
+                "Y": 28.51213,
+                "Z": 718.0732
+              },
+              "MinimumAngle": 210,
+              "MaximumAngle": 325
+            },
+            {
+              "Position": {
+                "X": 202.0474,
+                "Y": 30.18633,
+                "Z": 700.0951
+              },
+              "MinimumAngle": 160,
+              "MaximumAngle": 295
+            },
+            {
+              "Position": {
+                "X": 195.6331,
+                "Y": 33.43727,
+                "Z": 695.2228
+              },
+              "MinimumAngle": 150,
+              "MaximumAngle": 235
+            }
+          ]
+        },
+        {
+          "DataId": 32139,
+          "Locations": [
+            {
+              "Position": {
+                "X": 208.3533,
+                "Y": 28.65312,
+                "Z": 706.8864
+              },
+              "MinimumAngle": 180,
+              "MaximumAngle": 250
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "Nodes": [
+        {
+          "DataId": 32135,
+          "Locations": [
+            {
+              "Position": {
+                "X": 67.65472,
+                "Y": 25.89518,
+                "Z": 652.348
+              },
+              "MinimumAngle": -105,
+              "MaximumAngle": 15
+            }
+          ]
+        },
+        {
+          "DataId": 32136,
+          "Locations": [
+            {
+              "Position": {
+                "X": 41.55281,
+                "Y": 27.65364,
+                "Z": 654.9735
+              },
+              "MinimumAngle": -115,
+              "MaximumAngle": 35
+            },
+            {
+              "Position": {
+                "X": 52.98101,
+                "Y": 27.03981,
+                "Z": 652.5334
+              },
+              "MinimumAngle": -45,
+              "MaximumAngle": 55
+            },
+            {
+              "Position": {
+                "X": 71.80375,
+                "Y": 26.55341,
+                "Z": 644.8627
+              },
+              "MinimumAngle": 205,
+              "MaximumAngle": 335
+            }
+          ]
+        }
+      ]
+    }
+  ]
+}
diff --git a/GatheringPaths/6.x - Endwalker/Elpis/823_The Hungering Gardens_MIN.json b/GatheringPaths/6.x - Endwalker/Elpis/823_The Hungering Gardens_MIN.json
new file mode 100644 (file)
index 0000000..4bf777b
--- /dev/null
@@ -0,0 +1,158 @@
+{
+  "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/GatheringPaths/gatheringlocation-v1.json",
+  "Author": "liza",
+  "TerritoryId": 961,
+  "AetheryteShortcut": "Elpis - Poieten Oikos",
+  "Groups": [
+    {
+      "Nodes": [
+        {
+          "DataId": 33938,
+          "Locations": [
+            {
+              "Position": {
+                "X": 44.65063,
+                "Y": 100.2818,
+                "Z": -531.6971
+              },
+              "MinimumAngle": 150,
+              "MaximumAngle": 310
+            }
+          ]
+        },
+        {
+          "DataId": 33939,
+          "Locations": [
+            {
+              "Position": {
+                "X": 33.19277,
+                "Y": 104.5029,
+                "Z": -555.932
+              },
+              "MinimumAngle": 190,
+              "MaximumAngle": 350
+            },
+            {
+              "Position": {
+                "X": 65.9342,
+                "Y": 97.38677,
+                "Z": -524.9155
+              },
+              "MinimumAngle": 125,
+              "MaximumAngle": 295
+            },
+            {
+              "Position": {
+                "X": 74.52164,
+                "Y": 98.45871,
+                "Z": -489.864
+              },
+              "MinimumAngle": 165,
+              "MaximumAngle": 300
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "Nodes": [
+        {
+          "DataId": 33941,
+          "Locations": [
+            {
+              "Position": {
+                "X": 279.4078,
+                "Y": 101.9103,
+                "Z": -511.9555
+              },
+              "MinimumAngle": 80,
+              "MaximumAngle": 215
+            },
+            {
+              "Position": {
+                "X": 265.2476,
+                "Y": 100.4918,
+                "Z": -491.8746
+              },
+              "MinimumAngle": 110,
+              "MaximumAngle": 180
+            },
+            {
+              "Position": {
+                "X": 290.6152,
+                "Y": 102.41,
+                "Z": -549.2336
+              },
+              "MinimumAngle": 40,
+              "MaximumAngle": 185
+            }
+          ]
+        },
+        {
+          "DataId": 33940,
+          "Locations": [
+            {
+              "Position": {
+                "X": 288.9601,
+                "Y": 101.2474,
+                "Z": -520.9278
+              },
+              "MinimumAngle": 35,
+              "MaximumAngle": 145
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "Nodes": [
+        {
+          "DataId": 33937,
+          "Locations": [
+            {
+              "Position": {
+                "X": 124.7882,
+                "Y": 105.6518,
+                "Z": -712.3575
+              },
+              "MinimumAngle": -45,
+              "MaximumAngle": 70
+            },
+            {
+              "Position": {
+                "X": 94.71277,
+                "Y": 105.52,
+                "Z": -696.7798
+              },
+              "MinimumAngle": -60,
+              "MaximumAngle": 80
+            },
+            {
+              "Position": {
+                "X": 172.8746,
+                "Y": 102.9022,
+                "Z": -700.0879
+              },
+              "MinimumAngle": -50,
+              "MaximumAngle": 125
+            }
+          ]
+        },
+        {
+          "DataId": 33936,
+          "Locations": [
+            {
+              "Position": {
+                "X": 156.3894,
+                "Y": 103.6386,
+                "Z": -707.1092
+              },
+              "MinimumAngle": -85,
+              "MaximumAngle": 60
+            }
+          ]
+        }
+      ]
+    }
+  ]
+}
index 2ba70d892191dfc4c5016e1e0d12f213175c9c72..76477c0f088960813b87dfa05c67198bbc6b42e0 100644 (file)
@@ -1,6 +1,6 @@
 {
   "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/GatheringPaths/gatheringlocation-v1.json",
-  "Author": [],
+  "Author": "liza",
   "TerritoryId": 958,
   "AetheryteShortcut": "Garlemald - Camp Broken Glass",
   "Groups": [
diff --git a/GatheringPaths/6.x - Endwalker/Labyrinthos/816_Lower Acrinthos_MIN.json b/GatheringPaths/6.x - Endwalker/Labyrinthos/816_Lower Acrinthos_MIN.json
new file mode 100644 (file)
index 0000000..8749bf3
--- /dev/null
@@ -0,0 +1,158 @@
+{
+  "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/GatheringPaths/gatheringlocation-v1.json",
+  "Author": "liza",
+  "TerritoryId": 956,
+  "AetheryteShortcut": "Labyrinthos - Archeion",
+  "Groups": [
+    {
+      "Nodes": [
+        {
+          "DataId": 33902,
+          "Locations": [
+            {
+              "Position": {
+                "X": 88.60914,
+                "Y": 73.62239,
+                "Z": -402.4773
+              },
+              "MinimumAngle": 80,
+              "MaximumAngle": 235
+            }
+          ]
+        },
+        {
+          "DataId": 33903,
+          "Locations": [
+            {
+              "Position": {
+                "X": 85.61829,
+                "Y": 73.2991,
+                "Z": -400.5821
+              },
+              "MinimumAngle": 35,
+              "MaximumAngle": 225
+            },
+            {
+              "Position": {
+                "X": 93.23958,
+                "Y": 73.67628,
+                "Z": -393.219
+              },
+              "MinimumAngle": -80,
+              "MaximumAngle": 80
+            },
+            {
+              "Position": {
+                "X": 98.62136,
+                "Y": 74.0167,
+                "Z": -394.248
+              },
+              "MinimumAngle": -140,
+              "MaximumAngle": 15
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "Nodes": [
+        {
+          "DataId": 33905,
+          "Locations": [
+            {
+              "Position": {
+                "X": 120.6405,
+                "Y": 84.99234,
+                "Z": -556.7947
+              },
+              "MinimumAngle": -10,
+              "MaximumAngle": 155
+            },
+            {
+              "Position": {
+                "X": 90.8064,
+                "Y": 80.4303,
+                "Z": -549.3706
+              },
+              "MinimumAngle": -45,
+              "MaximumAngle": 90
+            },
+            {
+              "Position": {
+                "X": 108.5405,
+                "Y": 82.52325,
+                "Z": -552.4589
+              },
+              "MinimumAngle": -115,
+              "MaximumAngle": 65
+            }
+          ]
+        },
+        {
+          "DataId": 33904,
+          "Locations": [
+            {
+              "Position": {
+                "X": 102.0981,
+                "Y": 81.4679,
+                "Z": -550.4082
+              },
+              "MinimumAngle": -90,
+              "MaximumAngle": 75
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "Nodes": [
+        {
+          "DataId": 33901,
+          "Locations": [
+            {
+              "Position": {
+                "X": 2.243042,
+                "Y": 70.71661,
+                "Z": -453.1277
+              },
+              "MinimumAngle": 85,
+              "MaximumAngle": 215
+            },
+            {
+              "Position": {
+                "X": -18.2041,
+                "Y": 69.83583,
+                "Z": -464.331
+              },
+              "MinimumAngle": -120,
+              "MaximumAngle": 50
+            },
+            {
+              "Position": {
+                "X": 1.110765,
+                "Y": 71.56169,
+                "Z": -477.9129
+              },
+              "MinimumAngle": -135,
+              "MaximumAngle": 55
+            }
+          ]
+        },
+        {
+          "DataId": 33900,
+          "Locations": [
+            {
+              "Position": {
+                "X": -8.431995,
+                "Y": 70.52238,
+                "Z": -470.8453
+              },
+              "MinimumAngle": -125,
+              "MaximumAngle": 55
+            }
+          ]
+        }
+      ]
+    }
+  ]
+}
\ No newline at end of file
index 0b667246b8afc0e2fee72c03d9d4dae790e7262e..59b2e8439c011f0d879851b3ea021bd540c1ab79 100644 (file)
@@ -1,7 +1,8 @@
 {
   "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/GatheringPaths/gatheringlocation-v1.json",
-  "Author": [],
+  "Author": "liza",
   "TerritoryId": 959,
+  "AetheryteShortcut": "Mare Lamentorum - Sinus Lacrimarum",
   "Groups": [
     {
       "Nodes": [
       ]
     }
   ]
-}
\ No newline at end of file
+}
index d5a75e9c4e654f29403940f88b388db85e8eab99..5ad3c30c8be5b2de7232977ca1e149b169cf5ed6 100644 (file)
       ]
     }
   ]
-}
\ No newline at end of file
+}
index 8b3ade12c2126f6fee36ccb15dc105ca53cb994d..3359bf54b0264da29096569cda776cdc8040136d 100644 (file)
@@ -1,6 +1,6 @@
 {
   "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/GatheringPaths/gatheringlocation-v1.json",
-  "Author": [],
+  "Author": "liza",
   "TerritoryId": 1187,
   "AetheryteShortcut": "Urqopacha - Wachunpelo",
   "Groups": [
       ]
     }
   ]
-}
\ No newline at end of file
+}
index 494b74d6b1597be26649cd56cacd6b275bcd6742..0e80e665f4d78eff01929f464b6a9ff08c957396 100644 (file)
@@ -1,6 +1,6 @@
 {
   "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/GatheringPaths/gatheringlocation-v1.json",
-  "Author": [],
+  "Author": "liza",
   "TerritoryId": 1187,
   "AetheryteShortcut": "Urqopacha - Wachunpelo",
   "Groups": [
       ]
     }
   ]
-}
\ No newline at end of file
+}
index b011797075b12115374bf85dbdd07cad74266bde..f2bfae7254812f8a790182918a42270c1409ec61 100644 (file)
@@ -1,6 +1,6 @@
 {
   "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/GatheringPaths/gatheringlocation-v1.json",
-  "Author": [],
+  "Author": "liza",
   "TerritoryId": 1187,
   "AetheryteShortcut": "Urqopacha - Wachunpelo",
   "Groups": [
       ]
     }
   ]
-}
\ No newline at end of file
+}
index a59c4db7d5f8e2c94bd2207fdd6285b0dca6f737..e2ebf5530c0dcc29fb5788d8433bd1b723daa2d8 100644 (file)
           "InteractionType": "AcceptQuest"
         }
       ]
+    },
+    {
+      "Sequence": 1,
+      "Steps": [
+        {
+          "DataId": 2011719,
+          "Position": {
+            "X": -102.1897,
+            "Y": -7.0039062,
+            "Z": -59.92218
+          },
+          "TerritoryId": 628,
+          "InteractionType": "Interact",
+          "AetheryteShortcut": "Kugane",
+          "AethernetShortcut": [
+            "[Kugane] Aetheryte Plaza",
+            "[Kugane] Shiokaze Hostelry"
+          ]
+        }
+      ]
+    },
+    {
+      "Sequence": 2,
+      "Steps": [
+        {
+          "DataId": 1038506,
+          "Position": {
+            "X": -142.2904,
+            "Y": -4.7500057,
+            "Z": 199.6643
+          },
+          "TerritoryId": 628,
+          "InteractionType": "Interact",
+          "AethernetShortcut": [
+            "[Kugane] Kogane Dori Markets",
+            "[Kugane] Pier #1"
+          ]
+        }
+      ]
+    },
+    {
+      "Sequence": 3,
+      "Steps": [
+        {
+          "DataId": 1038507,
+          "Position": {
+            "X": 52.750366,
+            "Y": 8.02,
+            "Z": 152.81909
+          },
+          "TerritoryId": 628,
+          "InteractionType": "Interact",
+          "AethernetShortcut": [
+            "[Kugane] Pier #1",
+            "[Kugane] Thavnairian Consulate"
+          ]
+        }
+      ]
+    },
+    {
+      "Sequence": 4,
+      "Steps": [
+        {
+          "DataId": 2011720,
+          "Position": {
+            "X": 129.5033,
+            "Y": 24.979004,
+            "Z": 15.701477
+          },
+          "TerritoryId": 628,
+          "InteractionType": "Interact",
+          "AethernetShortcut": [
+            "[Kugane] Thavnairian Consulate",
+            "[Kugane] The Ruby Bazaar"
+          ]
+        }
+      ]
+    },
+    {
+      "Sequence": 5,
+      "Steps": [
+        {
+          "DataId": 1038508,
+          "Position": {
+            "X": 114.70203,
+            "Y": 12,
+            "Z": 35.965454
+          },
+          "TerritoryId": 628,
+          "InteractionType": "Interact",
+          "AetheryteShortcut": "Kugane",
+          "AethernetShortcut": [
+            "[Kugane] Aetheryte Plaza",
+            "[Kugane] The Ruby Bazaar"
+          ],
+          "RequiredGatheredItems": [
+            {
+              "ItemId": 35847,
+              "ItemCount": 1
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "Sequence": 6,
+      "Steps": [
+        {
+          "DataId": 1038510,
+          "Position": {
+            "X": -92.24078,
+            "Y": 11.799999,
+            "Z": -156.05408
+          },
+          "TerritoryId": 628,
+          "InteractionType": "Interact",
+          "AethernetShortcut": [
+            "[Kugane] The Ruby Bazaar",
+            "[Kugane] Bokairo Inn"
+          ]
+        }
+      ]
+    },
+    {
+      "Sequence": 255,
+      "Steps": [
+        {
+          "DataId": 1038501,
+          "Position": {
+            "X": -367.3305,
+            "Y": 21.846018,
+            "Z": -102.983154
+          },
+          "TerritoryId": 962,
+          "InteractionType": "CompleteQuest",
+          "AetheryteShortcut": "Old Sharlayan",
+          "AethernetShortcut": [
+            "[Old Sharlayan] Aetheryte Plaza",
+            "[Old Sharlayan] The Studium"
+          ],
+          "NextQuestId": 4158
+        }
+      ]
     }
   ]
 }
diff --git a/QuestPaths/6.x - Endwalker/Studium Deliveries/MIN, BTN/4158_The Culture of the Past.json b/QuestPaths/6.x - Endwalker/Studium Deliveries/MIN, BTN/4158_The Culture of the Past.json
new file mode 100644 (file)
index 0000000..aa12eb8
--- /dev/null
@@ -0,0 +1,49 @@
+{
+  "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
+  "Author": "liza",
+  "QuestSequence": [
+    {
+      "Sequence": 0,
+      "Steps": [
+        {
+          "DataId": 1038501,
+          "Position": {
+            "X": -367.3305,
+            "Y": 21.846018,
+            "Z": -102.983154
+          },
+          "TerritoryId": 962,
+          "InteractionType": "AcceptQuest"
+        }
+      ]
+    },
+    {
+      "Sequence": 255,
+      "Steps": [
+        {
+          "DataId": 1038501,
+          "Position": {
+            "X": -367.3305,
+            "Y": 21.846018,
+            "Z": -102.983154
+          },
+          "TerritoryId": 962,
+          "InteractionType": "CompleteQuest",
+          "AetheryteShortcut": "Old Sharlayan",
+          "AethernetShortcut": [
+            "[Old Sharlayan] Aetheryte Plaza",
+            "[Old Sharlayan] The Studium"
+          ],
+          "RequiredGatheredItems": [
+            {
+              "ItemId": 35603,
+              "ItemCount": 6,
+              "Collectability": 600
+            }
+          ],
+          "NextQuestId": 4159
+        }
+      ]
+    }
+  ]
+}
diff --git a/QuestPaths/6.x - Endwalker/Studium Deliveries/MIN, BTN/4159_The Culture of Love.json b/QuestPaths/6.x - Endwalker/Studium Deliveries/MIN, BTN/4159_The Culture of Love.json
new file mode 100644 (file)
index 0000000..850f04f
--- /dev/null
@@ -0,0 +1,102 @@
+{
+  "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
+  "Author": "liza",
+  "QuestSequence": [
+    {
+      "Sequence": 0,
+      "Steps": [
+        {
+          "DataId": 1038501,
+          "Position": {
+            "X": -367.3305,
+            "Y": 21.846018,
+            "Z": -102.983154
+          },
+          "TerritoryId": 962,
+          "InteractionType": "AcceptQuest"
+        }
+      ]
+    },
+    {
+      "Sequence": 1,
+      "Steps": [
+        {
+          "DataId": 1038503,
+          "Position": {
+            "X": -367.0863,
+            "Y": 21.84602,
+            "Z": -101.701416
+          },
+          "TerritoryId": 962,
+          "InteractionType": "Interact",
+          "AetheryteShortcut": "Old Sharlayan",
+          "AethernetShortcut": [
+            "[Old Sharlayan] Aetheryte Plaza",
+            "[Old Sharlayan] The Studium"
+          ],
+          "RequiredGatheredItems": [
+            {
+              "ItemId": 35848,
+              "ItemCount": 1
+            }
+          ],
+          "NextQuestId": 4159
+        }
+      ]
+    },
+    {
+      "Sequence": 2,
+      "Steps": [
+        {
+          "DataId": 1038512,
+          "Position": {
+            "X": -73.47223,
+            "Y": -16.147001,
+            "Z": 191.27173
+          },
+          "TerritoryId": 962,
+          "InteractionType": "Interact",
+          "AethernetShortcut": [
+            "[Old Sharlayan] The Studium",
+            "[Old Sharlayan] Scholar's Harbor"
+          ]
+        }
+      ]
+    },
+    {
+      "Sequence": 3,
+      "Steps": [
+        {
+          "DataId": 1038503,
+          "Position": {
+            "X": -367.0863,
+            "Y": 21.84602,
+            "Z": -101.701416
+          },
+          "TerritoryId": 962,
+          "InteractionType": "Interact",
+          "AethernetShortcut": [
+            "[Old Sharlayan] Scholar's Harbor",
+            "[Old Sharlayan] The Studium"
+          ]
+        }
+      ]
+    },
+    {
+      "Sequence": 255,
+      "Steps": [
+        {
+          "DataId": 1038501,
+          "Position": {
+            "X": -367.3305,
+            "Y": 21.846018,
+            "Z": -102.983154
+          },
+          "StopDistance": 7,
+          "TerritoryId": 962,
+          "InteractionType": "CompleteQuest"
+        }
+      ]
+    }
+  ]
+}
index ff19d3f469b687ac0061183408610c1dbbecd5f0..053b552fb26556a372bcdb056a5552ae6cfa044e 100644 (file)
@@ -148,7 +148,7 @@ internal sealed unsafe class GatheringController : MiniTaskController<GatheringC
         }
     }
 
-    private bool HasRequestedItems()
+    public bool HasRequestedItems()
     {
         if (_currentRequest == null)
             return true;
index 914d91b195a5ce719e2d1355327f73ef21308018..71ba96b11e3e08edf9d5fc70951bee7b45699bf6 100644 (file)
@@ -42,9 +42,16 @@ internal sealed class DoGather(
 
             if (gameGui.TryGetAddonByName("Gathering", out AtkUnitBase* atkUnitBase))
             {
-                _slots ??= ReadSlots(atkUnitBase);
-                var slot = _slots.Single(x => x.ItemId == _currentRequest.ItemId);
-                atkUnitBase->FireCallbackInt(slot.Index);
+                if (gatheringController.HasRequestedItems())
+                {
+                    atkUnitBase->FireCallbackInt(-1);
+                }
+                else
+                {
+                    _slots ??= ReadSlots(atkUnitBase);
+                    var slot = _slots.Single(x => x.ItemId == _currentRequest.ItemId);
+                    atkUnitBase->FireCallbackInt(slot.Index);
+                }
             }
         }
 
index 6a331ac0be8e03d13c7256e96e7b019c21d3b17a..eb41094c331f9586db2d0aebacfa6f86833069ae 100644 (file)
@@ -29,11 +29,26 @@ internal sealed class DoGatherCollectable(
 
     public bool Start() => true;
 
-    public ETaskResult Update()
+    public unsafe ETaskResult Update()
     {
         if (gatheringController.HasNodeDisappeared(_currentNode))
             return ETaskResult.TaskComplete;
 
+        if (gatheringController.HasRequestedItems())
+        {
+            if (gameGui.TryGetAddonByName("GatheringMasterpiece", out AtkUnitBase* atkUnitBase))
+            {
+                atkUnitBase->FireCallbackInt(1);
+                return ETaskResult.StillRunning;
+            }
+
+            if (gameGui.TryGetAddonByName("Gathering", out atkUnitBase))
+            {
+                atkUnitBase->FireCallbackInt(-1);
+                return ETaskResult.TaskComplete;
+            }
+        }
+
         NodeCondition? nodeCondition = GetNodeCondition();
         if (nodeCondition == null)
             return ETaskResult.TaskComplete;
@@ -84,7 +99,7 @@ internal sealed class DoGatherCollectable(
         return null;
     }
 
-    private Queue<EAction>? GetNextActions(NodeCondition nodeCondition)
+    private Queue<EAction> GetNextActions(NodeCondition nodeCondition)
     {
         uint gp = clientState.LocalPlayer!.CurrentGp;
         Queue<EAction> actions = new();
index 5d8022e69fc6168d985b225f56614fbc0aa95173..dce91814d33e26d2d468e44e67c32b9f248971c3 100644 (file)
@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using Dalamud.Game.Text;
 using Dalamud.Plugin.Services;
+using FFXIVClientStructs.FFXIV.Client.Game;
 using Microsoft.Extensions.DependencyInjection;
 using Questionable.Data;
 using Questionable.GatheringPaths;
@@ -30,6 +31,9 @@ internal static class GatheringRequiredItems
                         .TryGetValue(gatheringPointId, out GatheringRoot? gatheringRoot))
                     throw new TaskException("No path found for gathering point");
 
+                if (HasRequiredItems(requiredGatheredItems))
+                    continue;
+
                 if (gatheringRoot.AetheryteShortcut != null && clientState.TerritoryType != gatheringRoot.TerritoryId)
                 {
                     yield return serviceProvider.GetRequiredService<AetheryteShortcut.UseAetheryteShortcut>()
@@ -41,6 +45,14 @@ internal static class GatheringRequiredItems
             }
         }
 
+        private unsafe bool HasRequiredItems(GatheredItem requiredGatheredItems)
+        {
+            InventoryManager* inventoryManager = InventoryManager.Instance();
+            return inventoryManager != null &&
+                   inventoryManager->GetInventoryItemCount(requiredGatheredItems.ItemId,
+                       minCollectability: (short)requiredGatheredItems.Collectability) >= requiredGatheredItems.ItemCount;
+        }
+
         public ITask CreateTask(Quest quest, QuestSequence sequence, QuestStep step)
             => throw new NotImplementedException();
     }
@@ -76,7 +88,8 @@ internal static class GatheringRequiredItems
             if (_gatheredItem.Collectability == 0)
                 return $"Gather({_gatheredItem.ItemCount}x {_gatheredItem.ItemId})";
             else
-                return $"Gather({_gatheredItem.ItemCount}x {_gatheredItem.ItemId} {SeIconChar.Collectible.ToIconString()} {_gatheredItem.Collectability})";
+                return
+                    $"Gather({_gatheredItem.ItemCount}x {_gatheredItem.ItemId} {SeIconChar.Collectible.ToIconString()} {_gatheredItem.Collectability})";
         }
     }
 }