From 3210568ce9e4d098c8365c272b5117ba625fb012 Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Sat, 17 Aug 2024 22:09:47 +0200 Subject: [PATCH] Daily quest updates --- .../The Rak'tika Greatwood/689__MIN.json | 3 +- .../The Rak'tika Greatwood/694__BTN.json | 67 ++++++++ .../SkipConditionsExtensions.cs | 4 +- .../Dailies/3045_Deep-rooted Problems.json | 107 ++++++++++++- .../Dailies/3045_Deep-rooted Problems.md | 6 + .../Dwarves/Dailies/3905_The New Batch.json | 41 ++++- .../Dailies/3906_The Telltale Axles.json | 34 ++++- .../Qitari/Dailies/3808_A Touch of Home.json | 1 - .../Qitari/Dailies/3809_Mother's Recipe.json | 14 +- .../Dailies/3810_Power to the Vegetables.json | 60 +++++++- .../Loporrits/Dailies/4690_Dancing King.json | 45 +++++- .../Loporrits/Dailies/4691_Pieces of You.json | 37 ++++- .../Dailies/4610_A Brewing Reputation.json | 143 +++++++++++++++++- .../Dailies/4611_Grounds for Improvement.json | 65 +++++++- QuestPaths/quest-v1.json | 16 ++ .../Questing/SkipAetheryteCondition.cs | 1 + .../Controller/Steps/Interactions/UseItem.cs | 2 +- .../Steps/Shared/AetheryteShortcut.cs | 36 ++++- Questionable/Controller/Steps/Shared/Craft.cs | 2 +- .../Controller/Steps/Shared/SkipCondition.cs | 18 +-- .../Controller/Utils/QuestWorkUtils.cs | 4 +- 21 files changed, 669 insertions(+), 37 deletions(-) create mode 100644 GatheringPaths/5.x - Shadowbringers/The Rak'tika Greatwood/694__BTN.json create mode 100644 QuestPaths/4.x - Stormblood/Allied Societies/Ananta/Dailies/3045_Deep-rooted Problems.md diff --git a/GatheringPaths/5.x - Shadowbringers/The Rak'tika Greatwood/689__MIN.json b/GatheringPaths/5.x - Shadowbringers/The Rak'tika Greatwood/689__MIN.json index 8d6f0db1..49e07238 100644 --- a/GatheringPaths/5.x - Shadowbringers/The Rak'tika Greatwood/689__MIN.json +++ b/GatheringPaths/5.x - Shadowbringers/The Rak'tika Greatwood/689__MIN.json @@ -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 index 00000000..de354ef3 --- /dev/null +++ b/GatheringPaths/5.x - Shadowbringers/The Rak'tika Greatwood/694__BTN.json @@ -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 + } + } + ] + } + ] + } + ] +} diff --git a/QuestPathGenerator/RoslynElements/SkipConditionsExtensions.cs b/QuestPathGenerator/RoslynElements/SkipConditionsExtensions.cs index b53e02dd..87d5e0a2 100644 --- a/QuestPathGenerator/RoslynElements/SkipConditionsExtensions.cs +++ b/QuestPathGenerator/RoslynElements/SkipConditionsExtensions.cs @@ -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())))); } } diff --git a/QuestPaths/4.x - Stormblood/Allied Societies/Ananta/Dailies/3045_Deep-rooted Problems.json b/QuestPaths/4.x - Stormblood/Allied Societies/Ananta/Dailies/3045_Deep-rooted Problems.json index 2ff0c260..aa9b8be2 100644 --- a/QuestPaths/4.x - Stormblood/Allied Societies/Ananta/Dailies/3045_Deep-rooted Problems.json +++ b/QuestPaths/4.x - Stormblood/Allied Societies/Ananta/Dailies/3045_Deep-rooted Problems.json @@ -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, @@ -22,7 +21,111 @@ { "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 index 00000000..2705adfc --- /dev/null +++ b/QuestPaths/4.x - Stormblood/Allied Societies/Ananta/Dailies/3045_Deep-rooted Problems.md @@ -0,0 +1,6 @@ +``` +0 xx 0 0 0 0 | 2009324 2009325 2009326 + 33 | x x + 34 | x x + 35 | x x +``` diff --git a/QuestPaths/5.x - Shadowbringers/Allied Societies/Dwarves/Dailies/3905_The New Batch.json b/QuestPaths/5.x - Shadowbringers/Allied Societies/Dwarves/Dailies/3905_The New Batch.json index d73c93ee..737476ba 100644 --- a/QuestPaths/5.x - Shadowbringers/Allied Societies/Dwarves/Dailies/3905_The New Batch.json +++ b/QuestPaths/5.x - Shadowbringers/Allied Societies/Dwarves/Dailies/3905_The New Batch.json @@ -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, @@ -30,8 +29,44 @@ { "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 + ] + } ] }, { diff --git a/QuestPaths/5.x - Shadowbringers/Allied Societies/Dwarves/Dailies/3906_The Telltale Axles.json b/QuestPaths/5.x - Shadowbringers/Allied Societies/Dwarves/Dailies/3906_The Telltale Axles.json index d73c93ee..1e279138 100644 --- a/QuestPaths/5.x - Shadowbringers/Allied Societies/Dwarves/Dailies/3906_The Telltale Axles.json +++ b/QuestPaths/5.x - Shadowbringers/Allied Societies/Dwarves/Dailies/3906_The Telltale Axles.json @@ -30,8 +30,37 @@ { "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 }, { diff --git a/QuestPaths/5.x - Shadowbringers/Allied Societies/Qitari/Dailies/3808_A Touch of Home.json b/QuestPaths/5.x - Shadowbringers/Allied Societies/Qitari/Dailies/3808_A Touch of Home.json index 5fb2d6da..5f67cc1d 100644 --- a/QuestPaths/5.x - Shadowbringers/Allied Societies/Qitari/Dailies/3808_A Touch of Home.json +++ b/QuestPaths/5.x - Shadowbringers/Allied Societies/Qitari/Dailies/3808_A Touch of Home.json @@ -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, diff --git a/QuestPaths/5.x - Shadowbringers/Allied Societies/Qitari/Dailies/3809_Mother's Recipe.json b/QuestPaths/5.x - Shadowbringers/Allied Societies/Qitari/Dailies/3809_Mother's Recipe.json index 5b359ba6..158b9100 100644 --- a/QuestPaths/5.x - Shadowbringers/Allied Societies/Qitari/Dailies/3809_Mother's Recipe.json +++ b/QuestPaths/5.x - Shadowbringers/Allied Societies/Qitari/Dailies/3809_Mother's Recipe.json @@ -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, @@ -32,9 +31,16 @@ "AetheryteShortcut": "Rak'tika - Fanow", "Fly": true, "RequiredGatheredItems": [ - - - + { + "QuestAcceptedAsClass": "Miner", + "ItemId": 29520, + "ItemCount": 3 + }, + { + "QuestAcceptedAsClass": "Botanist", + "ItemId": 29546, + "ItemCount": 3 + } ] }, { diff --git a/QuestPaths/5.x - Shadowbringers/Allied Societies/Qitari/Dailies/3810_Power to the Vegetables.json b/QuestPaths/5.x - Shadowbringers/Allied Societies/Qitari/Dailies/3810_Power to the Vegetables.json index 5b359ba6..e7718beb 100644 --- a/QuestPaths/5.x - Shadowbringers/Allied Societies/Qitari/Dailies/3810_Power to the Vegetables.json +++ b/QuestPaths/5.x - Shadowbringers/Allied Societies/Qitari/Dailies/3810_Power to the Vegetables.json @@ -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, @@ -18,6 +17,65 @@ } ] }, + { + "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": [ diff --git a/QuestPaths/6.x - Endwalker/Allied Societies/Loporrits/Dailies/4690_Dancing King.json b/QuestPaths/6.x - Endwalker/Allied Societies/Loporrits/Dailies/4690_Dancing King.json index d731dcbc..52a51a21 100644 --- a/QuestPaths/6.x - Endwalker/Allied Societies/Loporrits/Dailies/4690_Dancing King.json +++ b/QuestPaths/6.x - Endwalker/Allied Societies/Loporrits/Dailies/4690_Dancing King.json @@ -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, @@ -30,6 +29,50 @@ { "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" + } ] }, { diff --git a/QuestPaths/6.x - Endwalker/Allied Societies/Loporrits/Dailies/4691_Pieces of You.json b/QuestPaths/6.x - Endwalker/Allied Societies/Loporrits/Dailies/4691_Pieces of You.json index d731dcbc..f42e401c 100644 --- a/QuestPaths/6.x - Endwalker/Allied Societies/Loporrits/Dailies/4691_Pieces of You.json +++ b/QuestPaths/6.x - Endwalker/Allied Societies/Loporrits/Dailies/4691_Pieces of You.json @@ -30,6 +30,39 @@ { "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, diff --git a/QuestPaths/6.x - Endwalker/Allied Societies/Omicrons/Dailies/4610_A Brewing Reputation.json b/QuestPaths/6.x - Endwalker/Allied Societies/Omicrons/Dailies/4610_A Brewing Reputation.json index 368803c3..1e9036a2 100644 --- a/QuestPaths/6.x - Endwalker/Allied Societies/Omicrons/Dailies/4610_A Brewing Reputation.json +++ b/QuestPaths/6.x - Endwalker/Allied Societies/Omicrons/Dailies/4610_A Brewing Reputation.json @@ -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, @@ -18,9 +17,151 @@ } ] }, + { + "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": { diff --git a/QuestPaths/6.x - Endwalker/Allied Societies/Omicrons/Dailies/4611_Grounds for Improvement.json b/QuestPaths/6.x - Endwalker/Allied Societies/Omicrons/Dailies/4611_Grounds for Improvement.json index 368803c3..9b34e831 100644 --- a/QuestPaths/6.x - Endwalker/Allied Societies/Omicrons/Dailies/4611_Grounds for Improvement.json +++ b/QuestPaths/6.x - Endwalker/Allied Societies/Omicrons/Dailies/4611_Grounds for Improvement.json @@ -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, @@ -18,9 +17,73 @@ } ] }, + { + "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": { diff --git a/QuestPaths/quest-v1.json b/QuestPaths/quest-v1.json index 3b1f5c7b..93250092 100644 --- a/QuestPaths/quest-v1.json +++ b/QuestPaths/quest-v1.json @@ -298,6 +298,22 @@ }, "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 diff --git a/Questionable.Model/Questing/SkipAetheryteCondition.cs b/Questionable.Model/Questing/SkipAetheryteCondition.cs index 383b57b7..573c3e2e 100644 --- a/Questionable.Model/Questing/SkipAetheryteCondition.cs +++ b/Questionable.Model/Questing/SkipAetheryteCondition.cs @@ -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; } } diff --git a/Questionable/Controller/Steps/Interactions/UseItem.cs b/Questionable/Controller/Steps/Interactions/UseItem.cs index ead22098..04e75c78 100644 --- a/Questionable/Controller/Steps/Interactions/UseItem.cs +++ b/Questionable/Controller/Steps/Interactions/UseItem.cs @@ -108,7 +108,7 @@ internal static class UseItem ushort territoryId = 129; Vector3 destination = new(-360.9217f, 8f, 38.92566f); yield return serviceProvider.GetRequiredService() - .With(null, EAetheryteLocation.Limsa, territoryId); + .With(null, null, EAetheryteLocation.Limsa, territoryId); yield return serviceProvider.GetRequiredService() .With(EAetheryteLocation.Limsa, EAetheryteLocation.LimsaArcanist); yield return serviceProvider.GetRequiredService(); diff --git a/Questionable/Controller/Steps/Shared/AetheryteShortcut.cs b/Questionable/Controller/Steps/Shared/AetheryteShortcut.cs index 59cd75f3..e48aaec6 100644 --- a/Questionable/Controller/Steps/Shared/AetheryteShortcut.cs +++ b/Questionable/Controller/Steps/Shared/AetheryteShortcut.cs @@ -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() - .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 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; } /// @@ -48,9 +53,11 @@ internal static class AetheryteShortcut /// 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()) diff --git a/Questionable/Controller/Steps/Shared/Craft.cs b/Questionable/Controller/Steps/Shared/Craft.cs index 2aeff864..92487f67 100644 --- a/Questionable/Controller/Steps/Shared/Craft.cs +++ b/Questionable/Controller/Steps/Shared/Craft.cs @@ -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; } } diff --git a/Questionable/Controller/Steps/Shared/SkipCondition.cs b/Questionable/Controller/Steps/Shared/SkipCondition.cs index eed128c5..69d44149 100644 --- a/Questionable/Controller/Steps/Shared/SkipCondition.cs +++ b/Questionable/Controller/Steps/Shared/SkipCondition.cs @@ -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)) { diff --git a/Questionable/Controller/Utils/QuestWorkUtils.cs b/Questionable/Controller/Utils/QuestWorkUtils.cs index 4af3c902..56484ecc 100644 --- a/Questionable/Controller/Utils/QuestWorkUtils.cs +++ b/Questionable/Controller/Utils/QuestWorkUtils.cs @@ -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?> requiredQuestVariables, - QuestProgressInfo questWork, ILogger logger) + QuestProgressInfo questWork, ILogger logger) { if (requiredQuestVariables.Count != 6 || requiredQuestVariables.All(x => x == null || x.Count == 0)) {