From ee2b49f5661236dc7a808fd279d823861991fe35 Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Sat, 3 Aug 2024 19:12:34 +0200 Subject: [PATCH] Studium MIN/BTN deliveries --- GatheringPaths/4.x - Stormblood/.gitkeep | 0 .../The Ruby Sea/487_Hells' Lid_MIN.json | 108 ++++++++++++ .../Elpis/823_The Hungering Gardens_MIN.json | 158 ++++++++++++++++++ .../822_Monitoring Station G_MIN.json | 2 +- .../Labyrinthos/816_Lower Acrinthos_MIN.json | 158 ++++++++++++++++++ .../821_The Crushing Brand_MIN.json | 5 +- .../Thavnair/820_The Hamsa Hatchery_MIN.json | 2 +- .../Urqopacha/974_Chabameki_MIN.json | 4 +- .../Urqopacha/992_Chabameki_BTN.json | 4 +- .../Urqopacha/993_Chabayuqeq_MIN.json | 4 +- .../MIN, BTN/4157_Hinageshi in Hingashi.json | 143 ++++++++++++++++ .../4158_The Culture of the Past.json | 49 ++++++ .../MIN, BTN/4159_The Culture of Love.json | 102 +++++++++++ .../Controller/GatheringController.cs | 2 +- .../Controller/Steps/Gathering/DoGather.cs | 13 +- .../Steps/Gathering/DoGatherCollectable.cs | 19 ++- .../Steps/Shared/GatheringRequiredItems.cs | 15 +- 17 files changed, 771 insertions(+), 17 deletions(-) delete mode 100644 GatheringPaths/4.x - Stormblood/.gitkeep create mode 100644 GatheringPaths/4.x - Stormblood/The Ruby Sea/487_Hells' Lid_MIN.json create mode 100644 GatheringPaths/6.x - Endwalker/Elpis/823_The Hungering Gardens_MIN.json create mode 100644 GatheringPaths/6.x - Endwalker/Labyrinthos/816_Lower Acrinthos_MIN.json create mode 100644 QuestPaths/6.x - Endwalker/Studium Deliveries/MIN, BTN/4158_The Culture of the Past.json create mode 100644 QuestPaths/6.x - Endwalker/Studium Deliveries/MIN, BTN/4159_The Culture of Love.json diff --git a/GatheringPaths/4.x - Stormblood/.gitkeep b/GatheringPaths/4.x - Stormblood/.gitkeep deleted file mode 100644 index e69de29b..00000000 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 index 00000000..47a321d2 --- /dev/null +++ b/GatheringPaths/4.x - Stormblood/The Ruby Sea/487_Hells' Lid_MIN.json @@ -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 index 00000000..4bf777b0 --- /dev/null +++ b/GatheringPaths/6.x - Endwalker/Elpis/823_The Hungering Gardens_MIN.json @@ -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 + } + ] + } + ] + } + ] +} diff --git a/GatheringPaths/6.x - Endwalker/Garlemald/822_Monitoring Station G_MIN.json b/GatheringPaths/6.x - Endwalker/Garlemald/822_Monitoring Station G_MIN.json index 2ba70d89..76477c0f 100644 --- a/GatheringPaths/6.x - Endwalker/Garlemald/822_Monitoring Station G_MIN.json +++ b/GatheringPaths/6.x - Endwalker/Garlemald/822_Monitoring Station G_MIN.json @@ -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 index 00000000..8749bf37 --- /dev/null +++ b/GatheringPaths/6.x - Endwalker/Labyrinthos/816_Lower Acrinthos_MIN.json @@ -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 diff --git a/GatheringPaths/6.x - Endwalker/Mare Lamentorum/821_The Crushing Brand_MIN.json b/GatheringPaths/6.x - Endwalker/Mare Lamentorum/821_The Crushing Brand_MIN.json index 0b667246..59b2e843 100644 --- a/GatheringPaths/6.x - Endwalker/Mare Lamentorum/821_The Crushing Brand_MIN.json +++ b/GatheringPaths/6.x - Endwalker/Mare Lamentorum/821_The Crushing Brand_MIN.json @@ -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": [ @@ -154,4 +155,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/GatheringPaths/6.x - Endwalker/Thavnair/820_The Hamsa Hatchery_MIN.json b/GatheringPaths/6.x - Endwalker/Thavnair/820_The Hamsa Hatchery_MIN.json index d5a75e9c..5ad3c30c 100644 --- a/GatheringPaths/6.x - Endwalker/Thavnair/820_The Hamsa Hatchery_MIN.json +++ b/GatheringPaths/6.x - Endwalker/Thavnair/820_The Hamsa Hatchery_MIN.json @@ -156,4 +156,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/GatheringPaths/7.x - Dawntrail/Urqopacha/974_Chabameki_MIN.json b/GatheringPaths/7.x - Dawntrail/Urqopacha/974_Chabameki_MIN.json index 8b3ade12..3359bf54 100644 --- a/GatheringPaths/7.x - Dawntrail/Urqopacha/974_Chabameki_MIN.json +++ b/GatheringPaths/7.x - Dawntrail/Urqopacha/974_Chabameki_MIN.json @@ -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": [ @@ -155,4 +155,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/GatheringPaths/7.x - Dawntrail/Urqopacha/992_Chabameki_BTN.json b/GatheringPaths/7.x - Dawntrail/Urqopacha/992_Chabameki_BTN.json index 494b74d6..0e80e665 100644 --- a/GatheringPaths/7.x - Dawntrail/Urqopacha/992_Chabameki_BTN.json +++ b/GatheringPaths/7.x - Dawntrail/Urqopacha/992_Chabameki_BTN.json @@ -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": [ @@ -147,4 +147,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/GatheringPaths/7.x - Dawntrail/Urqopacha/993_Chabayuqeq_MIN.json b/GatheringPaths/7.x - Dawntrail/Urqopacha/993_Chabayuqeq_MIN.json index b0117970..f2bfae72 100644 --- a/GatheringPaths/7.x - Dawntrail/Urqopacha/993_Chabayuqeq_MIN.json +++ b/GatheringPaths/7.x - Dawntrail/Urqopacha/993_Chabayuqeq_MIN.json @@ -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": [ @@ -145,4 +145,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/QuestPaths/6.x - Endwalker/Studium Deliveries/MIN, BTN/4157_Hinageshi in Hingashi.json b/QuestPaths/6.x - Endwalker/Studium Deliveries/MIN, BTN/4157_Hinageshi in Hingashi.json index a59c4db7..e2ebf553 100644 --- a/QuestPaths/6.x - Endwalker/Studium Deliveries/MIN, BTN/4157_Hinageshi in Hingashi.json +++ b/QuestPaths/6.x - Endwalker/Studium Deliveries/MIN, BTN/4157_Hinageshi in Hingashi.json @@ -16,6 +16,149 @@ "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 index 00000000..aa12eb80 --- /dev/null +++ b/QuestPaths/6.x - Endwalker/Studium Deliveries/MIN, BTN/4158_The Culture of the Past.json @@ -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 index 00000000..850f04f5 --- /dev/null +++ b/QuestPaths/6.x - Endwalker/Studium Deliveries/MIN, BTN/4159_The Culture of Love.json @@ -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" + } + ] + } + ] +} diff --git a/Questionable/Controller/GatheringController.cs b/Questionable/Controller/GatheringController.cs index ff19d3f4..053b552f 100644 --- a/Questionable/Controller/GatheringController.cs +++ b/Questionable/Controller/GatheringController.cs @@ -148,7 +148,7 @@ internal sealed unsafe class GatheringController : MiniTaskController 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); + } } } diff --git a/Questionable/Controller/Steps/Gathering/DoGatherCollectable.cs b/Questionable/Controller/Steps/Gathering/DoGatherCollectable.cs index 6a331ac0..eb41094c 100644 --- a/Questionable/Controller/Steps/Gathering/DoGatherCollectable.cs +++ b/Questionable/Controller/Steps/Gathering/DoGatherCollectable.cs @@ -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? GetNextActions(NodeCondition nodeCondition) + private Queue GetNextActions(NodeCondition nodeCondition) { uint gp = clientState.LocalPlayer!.CurrentGp; Queue actions = new(); diff --git a/Questionable/Controller/Steps/Shared/GatheringRequiredItems.cs b/Questionable/Controller/Steps/Shared/GatheringRequiredItems.cs index 5d8022e6..dce91814 100644 --- a/Questionable/Controller/Steps/Shared/GatheringRequiredItems.cs +++ b/Questionable/Controller/Steps/Shared/GatheringRequiredItems.cs @@ -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() @@ -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})"; } } }