From ae8a6e20be558ad3c09a1b50ffd951428702a4a9 Mon Sep 17 00:00:00 2001 From: pot0to <19513249+pot0to@users.noreply.github.com> Date: Sun, 16 Feb 2025 19:22:38 -0800 Subject: [PATCH 01/10] added in missing BLU class quest --- .../6.x - Endwalker/Class Quests/BLU/4773.txt | 1 - .../BLU/4773_And the Crowd Goes Mild.json | 85 +++++++++++++++++++ 2 files changed, 85 insertions(+), 1 deletion(-) delete mode 100644 QuestPaths/6.x - Endwalker/Class Quests/BLU/4773.txt create mode 100644 QuestPaths/6.x - Endwalker/Class Quests/BLU/4773_And the Crowd Goes Mild.json diff --git a/QuestPaths/6.x - Endwalker/Class Quests/BLU/4773.txt b/QuestPaths/6.x - Endwalker/Class Quests/BLU/4773.txt deleted file mode 100644 index 1e9793d1..00000000 --- a/QuestPaths/6.x - Endwalker/Class Quests/BLU/4773.txt +++ /dev/null @@ -1 +0,0 @@ -stopdistance: 5 diff --git a/QuestPaths/6.x - Endwalker/Class Quests/BLU/4773_And the Crowd Goes Mild.json b/QuestPaths/6.x - Endwalker/Class Quests/BLU/4773_And the Crowd Goes Mild.json new file mode 100644 index 00000000..0872b5b8 --- /dev/null +++ b/QuestPaths/6.x - Endwalker/Class Quests/BLU/4773_And the Crowd Goes Mild.json @@ -0,0 +1,85 @@ +{ + "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json", + "Author": "pot0to", + "QuestSequence": [ + { + "Sequence": 0, + "Steps": [ + { + "DataId": 1026852, + "Position": { + "X": 63.126587, + "Y": 14.005002, + "Z": 89.86035 + }, + "TerritoryId": 131, + "InteractionType": "AcceptQuest", + "AetheryteShortcut": "Ul'dah", + "AethernetShortcut": [ + "[Ul'dah] Aetheryte Plaza", + "[Ul'dah] Weavers' Guild" + ], + "SkipConditions": { + "AetheryteShortcutIf": { + "InSameTerritory": true, + "InTerritory": [ + 131 + ] + } + } + } + ] + }, + { + "Sequence": 1, + "Steps": [ + { + "DataId": 1045580, + "Position": { + "X": -11.215393, + "Y": 14.000013, + "Z": 18.417542 + }, + "TerritoryId": 131, + "InteractionType": "Interact" + }, + { + "DataId": 1045578, + "Position": { + "X": 0.9613037, + "Y": 15.000003, + "Z": -6.4851074 + }, + "TerritoryId": 131, + "InteractionType": "Interact" + }, + { + "DataId": 1045579, + "Position": { + "X": 16.372864, + "Y": 14.000015, + "Z": -16.342468 + }, + "TerritoryId": 131, + "InteractionType": "Interact" + } + ] + }, + { + "Sequence": 255, + "Steps": [ + { + "DataId": 1026937, + "Position": { + "X": 65.7511, + "Y": 14.005002, + "Z": 90.440186 + }, + "TerritoryId": 131, + "InteractionType": "CompleteQuest", + "NextQuestId": 4774 + } + ] + } + ] +} -- 2.47.2 From 4ecc1fb6752965be1958eb4383cec21e1eb5424e Mon Sep 17 00:00:00 2001 From: pot0to <19513249+pot0to@users.noreply.github.com> Date: Thu, 20 Feb 2025 14:17:20 -0800 Subject: [PATCH 02/10] adding one more moog --- .../Moogles/Dailies/2305_Built to Last.json | 159 +++--------------- 1 file changed, 22 insertions(+), 137 deletions(-) diff --git a/QuestPaths/3.x - Heavensward/Allied Societies/Moogles/Dailies/2305_Built to Last.json b/QuestPaths/3.x - Heavensward/Allied Societies/Moogles/Dailies/2305_Built to Last.json index 8ba39c75..76d3c16f 100644 --- a/QuestPaths/3.x - Heavensward/Allied Societies/Moogles/Dailies/2305_Built to Last.json +++ b/QuestPaths/3.x - Heavensward/Allied Societies/Moogles/Dailies/2305_Built to Last.json @@ -1,6 +1,6 @@ -{ +{ "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json", - "Author": "liza", + "Author": "pot0to", "QuestSequence": [ { "Sequence": 0, @@ -13,7 +13,8 @@ "Z": 313.98486 }, "TerritoryId": 400, - "InteractionType": "AcceptQuest" + "InteractionType": "AcceptQuest", + "Fly": true } ] }, @@ -21,14 +22,16 @@ "Sequence": 1, "Steps": [ { - "DataId": 1017471, + "DataId": 1017412, "Position": { - "X": -391.0735, - "Y": 59.9946, - "Z": 303.1814 + "X": 402.45667, + "Y": -74.34704, + "Z": 636.6826 }, "TerritoryId": 400, - "InteractionType": "Interact" + "InteractionType": "Interact", + "AetheryteShortcut": "The Churning Mists - Moghome", + "Fly": true } ] }, @@ -36,21 +39,17 @@ "Sequence": 2, "Steps": [ { - "Position": { - "X": -255.2606, - "Y": -24.29513, - "Z": 737.67456 - }, "TerritoryId": 400, - "InteractionType": "WalkTo", - "Fly": true + "InteractionType": "Craft", + "ItemId": 15738, + "ItemCount": 3 }, { - "DataId": 1017409, + "DataId": 1017413, "Position": { - "X": -254.71893, - "Y": -24.295156, - "Z": 738.5519 + "X": 397.97046, + "Y": -72.344055, + "Z": 653.0403 }, "TerritoryId": 400, "InteractionType": "Interact" @@ -61,130 +60,16 @@ "Sequence": 3, "Steps": [ { - "DataId": 2007244, + "DataId": 1017321, "Position": { - "X": -658.9609, - "Y": 94.25488, - "Z": -417.07483 + "X": -376.4859, + "Y": 60.89619, + "Z": 319.7832 }, "TerritoryId": 400, "InteractionType": "Interact", "AetheryteShortcut": "The Churning Mists - Zenith", - "Fly": true, - "CompletionQuestVariablesFlags": [ - null, - null, - null, - null, - null, - 128 - ] - }, - { - "Position": { - "X": -673.58887, - "Y": 93.64293, - "Z": -506.5746 - }, - "TerritoryId": 400, - "InteractionType": "WalkTo", - "Fly": true, - "SkipConditions": { - "StepIf": { - "CompletionQuestVariablesFlags": [ - null, - null, - null, - null, - null, - 64 - ] - } - } - }, - { - "DataId": 2007245, - "Position": { - "X": -671.1376, - "Y": 93.91919, - "Z": -507.49982 - }, - "TerritoryId": 400, - "InteractionType": "Interact", - "CompletionQuestVariablesFlags": [ - null, - null, - null, - null, - null, - 64 - ] - }, - { - "DataId": 2007246, - "Position": { - "X": -813.1685, - "Y": 94.865234, - "Z": -457.3282 - }, - "TerritoryId": 400, - "InteractionType": "Interact", - "Fly": true, - "CompletionQuestVariablesFlags": [ - null, - null, - null, - null, - null, - 32 - ] - } - ] - }, - { - "Sequence": 4, - "Steps": [ - { - "Position": { - "X": -255.2606, - "Y": -24.29513, - "Z": 737.67456 - }, - "TerritoryId": 400, - "InteractionType": "WalkTo", - "AetheryteShortcut": "The Churning Mists - Zenith", "Fly": true - }, - { - "DataId": 1017409, - "Position": { - "X": -254.71893, - "Y": -24.295156, - "Z": 738.5519 - }, - "TerritoryId": 400, - "InteractionType": "Interact" - } - ] - }, - { - "Sequence": 5, - "Steps": [ - { - "TerritoryId": 400, - "InteractionType": "Craft", - "ItemId": 15737, - "ItemCount": 1 - }, - { - "DataId": 1017410, - "Position": { - "X": -246.2044, - "Y": -24.295149, - "Z": 760.7384 - }, - "TerritoryId": 400, - "InteractionType": "Interact" } ] }, -- 2.47.2 From ddaa6518652aafd0dde6116c642c0801847c1c39 Mon Sep 17 00:00:00 2001 From: pot0to <19513249+pot0to@users.noreply.github.com> Date: Sun, 23 Feb 2025 23:46:28 -0800 Subject: [PATCH 03/10] adding 3 more beast tribe dailies --- .../Moogles/Dailies/2315_From Lax to Max.json | 114 +++++++++++- .../Kojin/Dailies/2997_Clammed Up.json | 164 ++++++++++++++++++ .../Namazu/Dailies/3126_A Favor Repaid.json | 95 ++++++++++ 3 files changed, 370 insertions(+), 3 deletions(-) create mode 100644 QuestPaths/4.x - Stormblood/Allied Societies/Kojin/Dailies/2997_Clammed Up.json create mode 100644 QuestPaths/4.x - Stormblood/Allied Societies/Namazu/Dailies/3126_A Favor Repaid.json diff --git a/QuestPaths/3.x - Heavensward/Allied Societies/Moogles/Dailies/2315_From Lax to Max.json b/QuestPaths/3.x - Heavensward/Allied Societies/Moogles/Dailies/2315_From Lax to Max.json index 1a867f70..519b8c91 100644 --- a/QuestPaths/3.x - Heavensward/Allied Societies/Moogles/Dailies/2315_From Lax to Max.json +++ b/QuestPaths/3.x - Heavensward/Allied Societies/Moogles/Dailies/2315_From Lax to Max.json @@ -1,7 +1,6 @@ { "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json", - "Author": "liza", - "Disabled": true, + "Author": "pot0to", "QuestSequence": [ { "Sequence": 0, @@ -14,10 +13,119 @@ "Z": 313.98486 }, "TerritoryId": 400, - "InteractionType": "AcceptQuest" + "InteractionType": "AcceptQuest", + "AetheryteShortcut": "The Churning Mists - Zenith", + "Fly": true } ] }, + { + "Sequence": 1, + "Steps": [ + { + "DataId": 1017459, + "Position": { + "X": -611.41376, + "Y": 70, + "Z": 209.30798 + }, + "TerritoryId": 400, + "InteractionType": "Interact", + "Fly": true + }, + { + "DataId": 1017458, + "Position": { + "X": -618.7381, + "Y": 70, + "Z": 207.9347 + }, + "TerritoryId": 400, + "InteractionType": "Interact" + }, + { + "DataId": 1017457, + "Position": { + "X": -619.74524, + "Y": 70, + "Z": 214.52649 + }, + "TerritoryId": 400, + "InteractionType": "Interact" + } + ] + }, + { + "Sequence": 2, + "Steps": [ + { + "DataId": 1017352, + "Position": { + "X": -56.809387, + "Y": -8.866012, + "Z": 161.8219 + }, + "TerritoryId": 400, + "InteractionType": "Interact", + "Fly": true + } + ] + }, + { + "Sequence": 3, + "Steps": [ + { + "DataId": 1017461, + "Position": { + "X": 79.9115, + "Y": -22.838034, + "Z": -123.67438 + }, + "TerritoryId": 400, + "InteractionType": "Interact", + "Fly": true + }, + { + "DataId": 1017462, + "Position": { + "X": -479.08752, + "Y": 106.92683, + "Z": -112.077515 + }, + "TerritoryId": 400, + "InteractionType": "Interact", + "Fly": true + }, + { + "DataId": 1017460, + "Position": { + "X": -689.05164, + "Y": 78.99983, + "Z": 266.0105 + }, + "TerritoryId": 400, + "InteractionType": "Interact", + "Fly": true, + "AetheryteShortcut": "The Churning Mists - Zenith" + } + ] + }, + { + "Sequence": 4, + "Steps": [ + { + "DataId": 1017352, + "Position": { + "X": -56.809387, + "Y": -8.866012, + "Z": 161.8219 + }, + "TerritoryId": 400, + "InteractionType": "Interact", + "Fly": true + } + ] + }, { "Sequence": 255, "Steps": [ diff --git a/QuestPaths/4.x - Stormblood/Allied Societies/Kojin/Dailies/2997_Clammed Up.json b/QuestPaths/4.x - Stormblood/Allied Societies/Kojin/Dailies/2997_Clammed Up.json new file mode 100644 index 00000000..a97df7e4 --- /dev/null +++ b/QuestPaths/4.x - Stormblood/Allied Societies/Kojin/Dailies/2997_Clammed Up.json @@ -0,0 +1,164 @@ +{ + "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json", + "Author": "pot0to", + "QuestSequence": [ + { + "Sequence": 0, + "Steps": [ + { + "DataId": 1024217, + "Position": { + "X": 394.39978, + "Y": -119.58932, + "Z": -232.28815 + }, + "TerritoryId": 613, + "InteractionType": "AcceptQuest", + "AetheryteShortcut": "Ruby Sea - Tamamizu" + } + ] + }, + { + "Sequence": 1, + "Steps": [ + { + "DataId": 2009137, + "Position": { + "X": -141.68011, + "Y": -149.34009, + "Z": -214.64868 + }, + "TerritoryId": 613, + "InteractionType": "Interact", + "RequiredQuestVariables": [ + null, + null, + null, + [ 2, 3, 4, 5, 18, 19, 20, 21, 34, 35, 36, 37, 50, 51, 52, 53 ], + null, + null + ] + }, + { + "DataId": 2009138, + "Position": { + "X": -298.2376, + "Y": -194.17108, + "Z": -126.20746 + }, + "TerritoryId": 613, + "InteractionType": "Interact", + "RequiredQuestVariables": [ + null, + null, + null, + [ 1, 3, 4, 5, 17, 19, 20, 21, 33, 35, 36, 37, 49, 51, 52, 53 ], + null, + null + ] + }, + { + "DataId": 2009139, + "Position": { + "X": -131.7312, + "Y": -191.97375, + "Z": -6.1189575 + }, + "TerritoryId": 613, + "InteractionType": "Interact", + "RequiredQuestVariables": [ + null, + null, + null, + [ 1, 2, 3, 4, 5, 17, 18, 19, 21, 33, 34, 35, 37, 49, 50, 51, 53 ], + null, + null + ] + }, + { + "DataId": 2009135, + "Position": { + "X": -77.74481, + "Y": -180.6211, + "Z": 33.157837 + }, + "TerritoryId": 613, + "InteractionType": "Interact", + "RequiredQuestVariables": [ + null, + null, + null, + [ 1, 2, 4, 5, 17, 18, 20, 21, 33, 34, 36, 37, 49, 50, 52, 53 ], + null, + null + ] + }, + { + "DataId": 2009136, + "Position": { + "X": -150.10309, + "Y": -167.01001, + "Z": 87.60205 + }, + "TerritoryId": 613, + "InteractionType": "Interact", + "RequiredQuestVariables": [ + null, + null, + null, + [ 1, 2, 3, 4, 17, 18, 19, 20, 33, 34, 35, 36, 49, 50, 51, 52 ], + null, + null + ] + } + ] + }, + { + "Sequence": 2, + "Steps": [ + { + "DataId": 1025824, + "Position": { + "X": 87.08313, + "Y": -11.459534, + "Z": 653.2234 + }, + "TerritoryId": 622, + "InteractionType": "Interact" + }, + { + "TerritoryId": 622, + "InteractionType": "Craft", + "ItemId": 22743, + "ItemCount": 1 + }, + { + "DataId": 1025822, + "Position": { + "X": 88.45642, + "Y": -11.547716, + "Z": 652.7351 + }, + "TerritoryId": 622, + "InteractionType": "Interact" + } + ] + }, + { + "Sequence": 255, + "Steps": [ + { + "DataId": 1024217, + "Position": { + "X": 394.39978, + "Y": -119.58932, + "Z": -232.28815 + }, + "TerritoryId": 613, + "InteractionType": "CompleteQuest", + "AetheryteShortcut": "Ruby Sea - Tamamizu" + } + ] + } + ] +} \ No newline at end of file diff --git a/QuestPaths/4.x - Stormblood/Allied Societies/Namazu/Dailies/3126_A Favor Repaid.json b/QuestPaths/4.x - Stormblood/Allied Societies/Namazu/Dailies/3126_A Favor Repaid.json new file mode 100644 index 00000000..cc34c574 --- /dev/null +++ b/QuestPaths/4.x - Stormblood/Allied Societies/Namazu/Dailies/3126_A Favor Repaid.json @@ -0,0 +1,95 @@ +{ + "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json", + "Author": "pot0to", + "QuestSequence": [ + { + "Sequence": 0, + "Steps": [ + { + "DataId": 1025602, + "Position": { + "X": -780.148, + "Y": 128.25195, + "Z": 97.154175 + }, + "TerritoryId": 622, + "InteractionType": "AcceptQuest", + "AetheryteShortcut": "Azim Steppe - Dhoro Iloh", + "SkipConditions": { + "AetheryteShortcutIf": { + "AetheryteLocked": "Azim Steppe - Dhoro Iloh" + } + } + } + ] + }, + { + "Sequence": 1, + "Steps": [ + { + "DataId": 1025822, + "Position": { + "X": 88.45642, + "Y": -11.547716, + "Z": 652.7351 + }, + "TerritoryId": 622, + "InteractionType": "Interact", + "Fly": true + } + ] + }, + { + "Sequence": 2, + "Steps": [ + { + "DataId": 1025824, + "Position": { + "X": 87.08313, + "Y": -11.459534, + "Z": 653.2234 + }, + "TerritoryId": 622, + "InteractionType": "Interact" + }, + { + "TerritoryId": 622, + "InteractionType": "Craft", + "ItemId": 22743, + "ItemCount": 1 + }, + { + "DataId": 1025822, + "Position": { + "X": 88.45642, + "Y": -11.547716, + "Z": 652.7351 + }, + "TerritoryId": 622, + "InteractionType": "Interact" + } + ] + }, + { + "Sequence": 255, + "Steps": [ + { + "DataId": 1025602, + "Position": { + "X": -780.148, + "Y": 128.25195, + "Z": 97.154175 + }, + "TerritoryId": 622, + "InteractionType": "CompleteQuest", + "AetheryteShortcut": "Azim Steppe - Dhoro Iloh", + "SkipConditions": { + "AetheryteShortcutIf": { + "AetheryteLocked": "Azim Steppe - Dhoro Iloh" + } + } + } + ] + } + ] +} \ No newline at end of file -- 2.47.2 From 60be4cc618600ede610b15085c05fff727be45f2 Mon Sep 17 00:00:00 2001 From: pot0to <19513249+pot0to@users.noreply.github.com> Date: Sun, 23 Feb 2025 23:59:54 -0800 Subject: [PATCH 04/10] reverting one quest i don't know why i changed --- .../Moogles/Dailies/2305_Built to Last.json | 157 +++++++++++++++--- .../BLU/4773_And the Crowd Goes Mild.json | 3 +- 2 files changed, 138 insertions(+), 22 deletions(-) diff --git a/QuestPaths/3.x - Heavensward/Allied Societies/Moogles/Dailies/2305_Built to Last.json b/QuestPaths/3.x - Heavensward/Allied Societies/Moogles/Dailies/2305_Built to Last.json index 76d3c16f..7e10c468 100644 --- a/QuestPaths/3.x - Heavensward/Allied Societies/Moogles/Dailies/2305_Built to Last.json +++ b/QuestPaths/3.x - Heavensward/Allied Societies/Moogles/Dailies/2305_Built to Last.json @@ -1,6 +1,6 @@ { "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json", - "Author": "pot0to", + "Author": "liza", "QuestSequence": [ { "Sequence": 0, @@ -13,8 +13,7 @@ "Z": 313.98486 }, "TerritoryId": 400, - "InteractionType": "AcceptQuest", - "Fly": true + "InteractionType": "AcceptQuest" } ] }, @@ -22,16 +21,14 @@ "Sequence": 1, "Steps": [ { - "DataId": 1017412, + "DataId": 1017471, "Position": { - "X": 402.45667, - "Y": -74.34704, - "Z": 636.6826 + "X": -391.0735, + "Y": 59.9946, + "Z": 303.1814 }, "TerritoryId": 400, - "InteractionType": "Interact", - "AetheryteShortcut": "The Churning Mists - Moghome", - "Fly": true + "InteractionType": "Interact" } ] }, @@ -39,17 +36,21 @@ "Sequence": 2, "Steps": [ { + "Position": { + "X": -255.2606, + "Y": -24.29513, + "Z": 737.67456 + }, "TerritoryId": 400, - "InteractionType": "Craft", - "ItemId": 15738, - "ItemCount": 3 + "InteractionType": "WalkTo", + "Fly": true }, { - "DataId": 1017413, + "DataId": 1017409, "Position": { - "X": 397.97046, - "Y": -72.344055, - "Z": 653.0403 + "X": -254.71893, + "Y": -24.295156, + "Z": 738.5519 }, "TerritoryId": 400, "InteractionType": "Interact" @@ -60,16 +61,130 @@ "Sequence": 3, "Steps": [ { - "DataId": 1017321, + "DataId": 2007244, "Position": { - "X": -376.4859, - "Y": 60.89619, - "Z": 319.7832 + "X": -658.9609, + "Y": 94.25488, + "Z": -417.07483 }, "TerritoryId": 400, "InteractionType": "Interact", "AetheryteShortcut": "The Churning Mists - Zenith", + "Fly": true, + "CompletionQuestVariablesFlags": [ + null, + null, + null, + null, + null, + 128 + ] + }, + { + "Position": { + "X": -673.58887, + "Y": 93.64293, + "Z": -506.5746 + }, + "TerritoryId": 400, + "InteractionType": "WalkTo", + "Fly": true, + "SkipConditions": { + "StepIf": { + "CompletionQuestVariablesFlags": [ + null, + null, + null, + null, + null, + 64 + ] + } + } + }, + { + "DataId": 2007245, + "Position": { + "X": -671.1376, + "Y": 93.91919, + "Z": -507.49982 + }, + "TerritoryId": 400, + "InteractionType": "Interact", + "CompletionQuestVariablesFlags": [ + null, + null, + null, + null, + null, + 64 + ] + }, + { + "DataId": 2007246, + "Position": { + "X": -813.1685, + "Y": 94.865234, + "Z": -457.3282 + }, + "TerritoryId": 400, + "InteractionType": "Interact", + "Fly": true, + "CompletionQuestVariablesFlags": [ + null, + null, + null, + null, + null, + 32 + ] + } + ] + }, + { + "Sequence": 4, + "Steps": [ + { + "Position": { + "X": -255.2606, + "Y": -24.29513, + "Z": 737.67456 + }, + "TerritoryId": 400, + "InteractionType": "WalkTo", + "AetheryteShortcut": "The Churning Mists - Zenith", "Fly": true + }, + { + "DataId": 1017409, + "Position": { + "X": -254.71893, + "Y": -24.295156, + "Z": 738.5519 + }, + "TerritoryId": 400, + "InteractionType": "Interact" + } + ] + }, + { + "Sequence": 5, + "Steps": [ + { + "TerritoryId": 400, + "InteractionType": "Craft", + "ItemId": 15737, + "ItemCount": 1 + }, + { + "DataId": 1017410, + "Position": { + "X": -246.2044, + "Y": -24.295149, + "Z": 760.7384 + }, + "TerritoryId": 400, + "InteractionType": "Interact" } ] }, diff --git a/QuestPaths/6.x - Endwalker/Class Quests/BLU/4773_And the Crowd Goes Mild.json b/QuestPaths/6.x - Endwalker/Class Quests/BLU/4773_And the Crowd Goes Mild.json index 0872b5b8..47a59196 100644 --- a/QuestPaths/6.x - Endwalker/Class Quests/BLU/4773_And the Crowd Goes Mild.json +++ b/QuestPaths/6.x - Endwalker/Class Quests/BLU/4773_And the Crowd Goes Mild.json @@ -26,7 +26,8 @@ 131 ] } - } + }, + "StopDistance": 5 } ] }, -- 2.47.2 From 3297b7009cc02a08959b3a352a76eec2cf5df387 Mon Sep 17 00:00:00 2001 From: pot0to <19513249+pot0to@users.noreply.github.com> Date: Thu, 27 Feb 2025 13:23:17 -0800 Subject: [PATCH 05/10] idk --- Questionable/External/QuestionableIpc.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Questionable/External/QuestionableIpc.cs b/Questionable/External/QuestionableIpc.cs index ce76077c..f1095f1e 100644 --- a/Questionable/External/QuestionableIpc.cs +++ b/Questionable/External/QuestionableIpc.cs @@ -6,6 +6,7 @@ using Dalamud.Plugin; using Dalamud.Plugin.Ipc; using JetBrains.Annotations; using Questionable.Controller; +using Questionable.Functions; using Questionable.Model.Questing; using Questionable.Windows.QuestComponents; @@ -19,9 +20,11 @@ internal sealed class QuestionableIpc : IDisposable private const string IpcGetCurrentlyActiveEventQuests = "Questionable.GetCurrentlyActiveEventQuests"; private const string IpcStartQuest = "Questionable.StartQuest"; private const string IpcStartSingleQuest = "Questionable.StartSingleQuest"; + private const string IpcIsQuestLocked = "Questionable.IsQuestLocked"; private readonly QuestController _questController; private readonly QuestRegistry _questRegistry; + private readonly QuestFunctions _questFunctions; private readonly ICallGateProvider _isRunning; private readonly ICallGateProvider _getCurrentQuestId; @@ -29,15 +32,18 @@ internal sealed class QuestionableIpc : IDisposable private readonly ICallGateProvider> _getCurrentlyActiveEventQuests; private readonly ICallGateProvider _startQuest; private readonly ICallGateProvider _startSingleQuest; + private readonly ICallGateProvider _isQuestLocked; public QuestionableIpc( QuestController questController, EventInfoComponent eventInfoComponent, QuestRegistry questRegistry, + QuestFunctions questFunctions, IDalamudPluginInterface pluginInterface) { _questController = questController; _questRegistry = questRegistry; + _questFunctions = questFunctions; _isRunning = pluginInterface.GetIpcProvider(IpcIsRunning); _isRunning.RegisterFunc(() => @@ -59,6 +65,10 @@ internal sealed class QuestionableIpc : IDisposable _startSingleQuest = pluginInterface.GetIpcProvider(IpcStartSingleQuest); _startSingleQuest.RegisterFunc(questId => StartQuest(questId, true)); + //_startSingleQuest.RegisterFunc((questId) => StartQuest(questController, questRegistry, questId, true)); + + _isQuestLocked = pluginInterface.GetIpcProvider(IpcIsQuestLocked); + _isQuestLocked.RegisterFunc((questId) => IsQuestLocked(questId)); } private bool StartQuest(string questId, bool single) @@ -102,6 +112,16 @@ internal sealed class QuestionableIpc : IDisposable }; } + private bool IsQuestLocked(string questId) + { + if (ElementId.TryFromString(questId, out var elementId) && elementId != null && + _questRegistry.TryGetQuest(elementId, out var quest)) + { + return _questFunctions.IsQuestLocked(elementId); + } + return true; + } + public void Dispose() { _startSingleQuest.UnregisterFunc(); -- 2.47.2 From 8a8034de94eece0de7a0df012bd47bdc6aca762a Mon Sep 17 00:00:00 2001 From: pot0to <19513249+pot0to@users.noreply.github.com> Date: Thu, 27 Feb 2025 15:37:43 -0800 Subject: [PATCH 06/10] added quest piriority ipc --- Questionable/Controller/QuestController.cs | 10 ++++++++++ Questionable/External/QuestionableIpc.cs | 14 ++++++++++++++ Questionable/Windows/PriorityWindow.cs | 16 ++++++++-------- 3 files changed, 32 insertions(+), 8 deletions(-) diff --git a/Questionable/Controller/QuestController.cs b/Questionable/Controller/QuestController.cs index c10d160c..83c12357 100644 --- a/Questionable/Controller/QuestController.cs +++ b/Questionable/Controller/QuestController.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Linq; +using System.Text; using Dalamud.Game.ClientState.Conditions; using Dalamud.Game.ClientState.Keys; using Dalamud.Game.Gui.Toast; @@ -819,6 +820,15 @@ internal sealed class QuestController : MiniTaskController return false; } + public void ImportQuestPriority(List questElements) + { + foreach (ElementId elementId in questElements) + { + if (_questRegistry.TryGetQuest(elementId, out Quest? quest) && !ManualPriorityQuests.Contains(quest)) + ManualPriorityQuests.Add(quest); + } + } + public bool WasLastTaskUpdateWithin(TimeSpan timeSpan) { _logger.LogInformation("Last update: {Update}", _lastTaskUpdate); diff --git a/Questionable/External/QuestionableIpc.cs b/Questionable/External/QuestionableIpc.cs index f1095f1e..f27d2065 100644 --- a/Questionable/External/QuestionableIpc.cs +++ b/Questionable/External/QuestionableIpc.cs @@ -2,12 +2,14 @@ using System.Collections.Generic; using System.Linq; using System.Numerics; +using System.Reflection.Metadata; using Dalamud.Plugin; using Dalamud.Plugin.Ipc; using JetBrains.Annotations; using Questionable.Controller; using Questionable.Functions; using Questionable.Model.Questing; +using Questionable.Windows; using Questionable.Windows.QuestComponents; namespace Questionable.External; @@ -21,6 +23,7 @@ internal sealed class QuestionableIpc : IDisposable private const string IpcStartQuest = "Questionable.StartQuest"; private const string IpcStartSingleQuest = "Questionable.StartSingleQuest"; private const string IpcIsQuestLocked = "Questionable.IsQuestLocked"; + private const string IpcImportQuestPriority = "Questionable.ImportQuestPriority"; private readonly QuestController _questController; private readonly QuestRegistry _questRegistry; @@ -33,6 +36,7 @@ internal sealed class QuestionableIpc : IDisposable private readonly ICallGateProvider _startQuest; private readonly ICallGateProvider _startSingleQuest; private readonly ICallGateProvider _isQuestLocked; + private readonly ICallGateProvider _importQuestPriority; public QuestionableIpc( QuestController questController, @@ -69,6 +73,9 @@ internal sealed class QuestionableIpc : IDisposable _isQuestLocked = pluginInterface.GetIpcProvider(IpcIsQuestLocked); _isQuestLocked.RegisterFunc((questId) => IsQuestLocked(questId)); + + _importQuestPriority = pluginInterface.GetIpcProvider(IpcImportQuestPriority); + _importQuestPriority.RegisterFunc((encodedQuestPriority) => ImportQuestPriority(encodedQuestPriority)); } private bool StartQuest(string questId, bool single) @@ -122,6 +129,13 @@ internal sealed class QuestionableIpc : IDisposable return true; } + private bool ImportQuestPriority(string encodedQuestPriority) + { + List questElements = PriorityWindow.ParseQuestPriority(encodedQuestPriority); + _questController.ImportQuestPriority(questElements); + return true; + } + public void Dispose() { _startSingleQuest.UnregisterFunc(); diff --git a/Questionable/Windows/PriorityWindow.cs b/Questionable/Windows/PriorityWindow.cs index 8b4d5202..55e74ae5 100644 --- a/Questionable/Windows/PriorityWindow.cs +++ b/Questionable/Windows/PriorityWindow.cs @@ -249,11 +249,16 @@ internal sealed class PriorityWindow : LWindow } private List ParseClipboardItems() + { + string? clipboardText = GetClipboardText(); + return ParseQuestPriority(clipboardText); + } + + public static List ParseQuestPriority(string? clipboardText) { List clipboardItems = new List(); try { - string? clipboardText = GetClipboardText(); if (clipboardText != null && clipboardText.StartsWith(ClipboardPrefix, StringComparison.InvariantCulture)) { clipboardText = clipboardText.Substring(ClipboardPrefix.Length); @@ -281,14 +286,9 @@ internal sealed class PriorityWindow : LWindow _chatGui.Print("Copied quests to clipboard.", CommandHandler.MessageTag, CommandHandler.TagColor); } - private void ImportFromClipboard(List clipboardItems) + private void ImportFromClipboard(List questElements) { - foreach (ElementId elementId in clipboardItems) - { - if (_questRegistry.TryGetQuest(elementId, out Quest? quest) && - !_questController.ManualPriorityQuests.Contains(quest)) - _questController.ManualPriorityQuests.Add(quest); - } + _questController.ImportQuestPriority(questElements); } /// -- 2.47.2 From 6bd4583cc8ecefda08c2d87ab84c04f33437f9ac Mon Sep 17 00:00:00 2001 From: pot0to <19513249+pot0to@users.noreply.github.com> Date: Sat, 1 Mar 2025 12:51:09 -0800 Subject: [PATCH 07/10] fixing whitespace to remove diff from PR --- .../Allied Societies/Moogles/Dailies/2305_Built to Last.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/QuestPaths/3.x - Heavensward/Allied Societies/Moogles/Dailies/2305_Built to Last.json b/QuestPaths/3.x - Heavensward/Allied Societies/Moogles/Dailies/2305_Built to Last.json index 7e10c468..8ba39c75 100644 --- a/QuestPaths/3.x - Heavensward/Allied Societies/Moogles/Dailies/2305_Built to Last.json +++ b/QuestPaths/3.x - Heavensward/Allied Societies/Moogles/Dailies/2305_Built to Last.json @@ -1,4 +1,4 @@ -{ +{ "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json", "Author": "liza", "QuestSequence": [ -- 2.47.2 From 05202320db63d998a8d2845b3a2396b905ea3b0a Mon Sep 17 00:00:00 2001 From: pot0to <19513249+pot0to@users.noreply.github.com> Date: Sat, 1 Mar 2025 12:53:20 -0800 Subject: [PATCH 08/10] moving new quest paths to another branch --- .../Moogles/Dailies/2315_From Lax to Max.json | 114 +----------- .../Kojin/Dailies/2997_Clammed Up.json | 164 ------------------ .../Namazu/Dailies/3126_A Favor Repaid.json | 95 ---------- 3 files changed, 3 insertions(+), 370 deletions(-) delete mode 100644 QuestPaths/4.x - Stormblood/Allied Societies/Kojin/Dailies/2997_Clammed Up.json delete mode 100644 QuestPaths/4.x - Stormblood/Allied Societies/Namazu/Dailies/3126_A Favor Repaid.json diff --git a/QuestPaths/3.x - Heavensward/Allied Societies/Moogles/Dailies/2315_From Lax to Max.json b/QuestPaths/3.x - Heavensward/Allied Societies/Moogles/Dailies/2315_From Lax to Max.json index 519b8c91..1a867f70 100644 --- a/QuestPaths/3.x - Heavensward/Allied Societies/Moogles/Dailies/2315_From Lax to Max.json +++ b/QuestPaths/3.x - Heavensward/Allied Societies/Moogles/Dailies/2315_From Lax to Max.json @@ -1,6 +1,7 @@ { "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json", - "Author": "pot0to", + "Author": "liza", + "Disabled": true, "QuestSequence": [ { "Sequence": 0, @@ -13,119 +14,10 @@ "Z": 313.98486 }, "TerritoryId": 400, - "InteractionType": "AcceptQuest", - "AetheryteShortcut": "The Churning Mists - Zenith", - "Fly": true + "InteractionType": "AcceptQuest" } ] }, - { - "Sequence": 1, - "Steps": [ - { - "DataId": 1017459, - "Position": { - "X": -611.41376, - "Y": 70, - "Z": 209.30798 - }, - "TerritoryId": 400, - "InteractionType": "Interact", - "Fly": true - }, - { - "DataId": 1017458, - "Position": { - "X": -618.7381, - "Y": 70, - "Z": 207.9347 - }, - "TerritoryId": 400, - "InteractionType": "Interact" - }, - { - "DataId": 1017457, - "Position": { - "X": -619.74524, - "Y": 70, - "Z": 214.52649 - }, - "TerritoryId": 400, - "InteractionType": "Interact" - } - ] - }, - { - "Sequence": 2, - "Steps": [ - { - "DataId": 1017352, - "Position": { - "X": -56.809387, - "Y": -8.866012, - "Z": 161.8219 - }, - "TerritoryId": 400, - "InteractionType": "Interact", - "Fly": true - } - ] - }, - { - "Sequence": 3, - "Steps": [ - { - "DataId": 1017461, - "Position": { - "X": 79.9115, - "Y": -22.838034, - "Z": -123.67438 - }, - "TerritoryId": 400, - "InteractionType": "Interact", - "Fly": true - }, - { - "DataId": 1017462, - "Position": { - "X": -479.08752, - "Y": 106.92683, - "Z": -112.077515 - }, - "TerritoryId": 400, - "InteractionType": "Interact", - "Fly": true - }, - { - "DataId": 1017460, - "Position": { - "X": -689.05164, - "Y": 78.99983, - "Z": 266.0105 - }, - "TerritoryId": 400, - "InteractionType": "Interact", - "Fly": true, - "AetheryteShortcut": "The Churning Mists - Zenith" - } - ] - }, - { - "Sequence": 4, - "Steps": [ - { - "DataId": 1017352, - "Position": { - "X": -56.809387, - "Y": -8.866012, - "Z": 161.8219 - }, - "TerritoryId": 400, - "InteractionType": "Interact", - "Fly": true - } - ] - }, { "Sequence": 255, "Steps": [ diff --git a/QuestPaths/4.x - Stormblood/Allied Societies/Kojin/Dailies/2997_Clammed Up.json b/QuestPaths/4.x - Stormblood/Allied Societies/Kojin/Dailies/2997_Clammed Up.json deleted file mode 100644 index a97df7e4..00000000 --- a/QuestPaths/4.x - Stormblood/Allied Societies/Kojin/Dailies/2997_Clammed Up.json +++ /dev/null @@ -1,164 +0,0 @@ -{ - "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json", - "Author": "pot0to", - "QuestSequence": [ - { - "Sequence": 0, - "Steps": [ - { - "DataId": 1024217, - "Position": { - "X": 394.39978, - "Y": -119.58932, - "Z": -232.28815 - }, - "TerritoryId": 613, - "InteractionType": "AcceptQuest", - "AetheryteShortcut": "Ruby Sea - Tamamizu" - } - ] - }, - { - "Sequence": 1, - "Steps": [ - { - "DataId": 2009137, - "Position": { - "X": -141.68011, - "Y": -149.34009, - "Z": -214.64868 - }, - "TerritoryId": 613, - "InteractionType": "Interact", - "RequiredQuestVariables": [ - null, - null, - null, - [ 2, 3, 4, 5, 18, 19, 20, 21, 34, 35, 36, 37, 50, 51, 52, 53 ], - null, - null - ] - }, - { - "DataId": 2009138, - "Position": { - "X": -298.2376, - "Y": -194.17108, - "Z": -126.20746 - }, - "TerritoryId": 613, - "InteractionType": "Interact", - "RequiredQuestVariables": [ - null, - null, - null, - [ 1, 3, 4, 5, 17, 19, 20, 21, 33, 35, 36, 37, 49, 51, 52, 53 ], - null, - null - ] - }, - { - "DataId": 2009139, - "Position": { - "X": -131.7312, - "Y": -191.97375, - "Z": -6.1189575 - }, - "TerritoryId": 613, - "InteractionType": "Interact", - "RequiredQuestVariables": [ - null, - null, - null, - [ 1, 2, 3, 4, 5, 17, 18, 19, 21, 33, 34, 35, 37, 49, 50, 51, 53 ], - null, - null - ] - }, - { - "DataId": 2009135, - "Position": { - "X": -77.74481, - "Y": -180.6211, - "Z": 33.157837 - }, - "TerritoryId": 613, - "InteractionType": "Interact", - "RequiredQuestVariables": [ - null, - null, - null, - [ 1, 2, 4, 5, 17, 18, 20, 21, 33, 34, 36, 37, 49, 50, 52, 53 ], - null, - null - ] - }, - { - "DataId": 2009136, - "Position": { - "X": -150.10309, - "Y": -167.01001, - "Z": 87.60205 - }, - "TerritoryId": 613, - "InteractionType": "Interact", - "RequiredQuestVariables": [ - null, - null, - null, - [ 1, 2, 3, 4, 17, 18, 19, 20, 33, 34, 35, 36, 49, 50, 51, 52 ], - null, - null - ] - } - ] - }, - { - "Sequence": 2, - "Steps": [ - { - "DataId": 1025824, - "Position": { - "X": 87.08313, - "Y": -11.459534, - "Z": 653.2234 - }, - "TerritoryId": 622, - "InteractionType": "Interact" - }, - { - "TerritoryId": 622, - "InteractionType": "Craft", - "ItemId": 22743, - "ItemCount": 1 - }, - { - "DataId": 1025822, - "Position": { - "X": 88.45642, - "Y": -11.547716, - "Z": 652.7351 - }, - "TerritoryId": 622, - "InteractionType": "Interact" - } - ] - }, - { - "Sequence": 255, - "Steps": [ - { - "DataId": 1024217, - "Position": { - "X": 394.39978, - "Y": -119.58932, - "Z": -232.28815 - }, - "TerritoryId": 613, - "InteractionType": "CompleteQuest", - "AetheryteShortcut": "Ruby Sea - Tamamizu" - } - ] - } - ] -} \ No newline at end of file diff --git a/QuestPaths/4.x - Stormblood/Allied Societies/Namazu/Dailies/3126_A Favor Repaid.json b/QuestPaths/4.x - Stormblood/Allied Societies/Namazu/Dailies/3126_A Favor Repaid.json deleted file mode 100644 index cc34c574..00000000 --- a/QuestPaths/4.x - Stormblood/Allied Societies/Namazu/Dailies/3126_A Favor Repaid.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json", - "Author": "pot0to", - "QuestSequence": [ - { - "Sequence": 0, - "Steps": [ - { - "DataId": 1025602, - "Position": { - "X": -780.148, - "Y": 128.25195, - "Z": 97.154175 - }, - "TerritoryId": 622, - "InteractionType": "AcceptQuest", - "AetheryteShortcut": "Azim Steppe - Dhoro Iloh", - "SkipConditions": { - "AetheryteShortcutIf": { - "AetheryteLocked": "Azim Steppe - Dhoro Iloh" - } - } - } - ] - }, - { - "Sequence": 1, - "Steps": [ - { - "DataId": 1025822, - "Position": { - "X": 88.45642, - "Y": -11.547716, - "Z": 652.7351 - }, - "TerritoryId": 622, - "InteractionType": "Interact", - "Fly": true - } - ] - }, - { - "Sequence": 2, - "Steps": [ - { - "DataId": 1025824, - "Position": { - "X": 87.08313, - "Y": -11.459534, - "Z": 653.2234 - }, - "TerritoryId": 622, - "InteractionType": "Interact" - }, - { - "TerritoryId": 622, - "InteractionType": "Craft", - "ItemId": 22743, - "ItemCount": 1 - }, - { - "DataId": 1025822, - "Position": { - "X": 88.45642, - "Y": -11.547716, - "Z": 652.7351 - }, - "TerritoryId": 622, - "InteractionType": "Interact" - } - ] - }, - { - "Sequence": 255, - "Steps": [ - { - "DataId": 1025602, - "Position": { - "X": -780.148, - "Y": 128.25195, - "Z": 97.154175 - }, - "TerritoryId": 622, - "InteractionType": "CompleteQuest", - "AetheryteShortcut": "Azim Steppe - Dhoro Iloh", - "SkipConditions": { - "AetheryteShortcutIf": { - "AetheryteLocked": "Azim Steppe - Dhoro Iloh" - } - } - } - ] - } - ] -} \ No newline at end of file -- 2.47.2 From a11d2362be7ca44cf8dc8d3e23cfa513f7911efe Mon Sep 17 00:00:00 2001 From: pot0to <19513249+pot0to@users.noreply.github.com> Date: Sat, 1 Mar 2025 13:03:00 -0800 Subject: [PATCH 09/10] removed unnecessary imports --- Questionable/Controller/QuestController.cs | 1 - Questionable/External/QuestionableIpc.cs | 1 - 2 files changed, 2 deletions(-) diff --git a/Questionable/Controller/QuestController.cs b/Questionable/Controller/QuestController.cs index 83c12357..099b47ac 100644 --- a/Questionable/Controller/QuestController.cs +++ b/Questionable/Controller/QuestController.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Linq; -using System.Text; using Dalamud.Game.ClientState.Conditions; using Dalamud.Game.ClientState.Keys; using Dalamud.Game.Gui.Toast; diff --git a/Questionable/External/QuestionableIpc.cs b/Questionable/External/QuestionableIpc.cs index f27d2065..c2ba2426 100644 --- a/Questionable/External/QuestionableIpc.cs +++ b/Questionable/External/QuestionableIpc.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.Linq; using System.Numerics; -using System.Reflection.Metadata; using Dalamud.Plugin; using Dalamud.Plugin.Ipc; using JetBrains.Annotations; -- 2.47.2 From da360f47f29ec3eaa409e11860783355c1aac5fb Mon Sep 17 00:00:00 2001 From: pot0to <19513249+pot0to@users.noreply.github.com> Date: Sat, 1 Mar 2025 19:35:32 -0800 Subject: [PATCH 10/10] added all the import export insert stuff --- Questionable/Controller/QuestController.cs | 35 ++++++++++++++ Questionable/External/QuestionableIpc.cs | 53 +++++++++++++++++++++- Questionable/Windows/PriorityWindow.cs | 15 ++++-- 3 files changed, 96 insertions(+), 7 deletions(-) diff --git a/Questionable/Controller/QuestController.cs b/Questionable/Controller/QuestController.cs index 099b47ac..23680978 100644 --- a/Questionable/Controller/QuestController.cs +++ b/Questionable/Controller/QuestController.cs @@ -2,12 +2,14 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Linq; +using System.Text; using Dalamud.Game.ClientState.Conditions; using Dalamud.Game.ClientState.Keys; using Dalamud.Game.Gui.Toast; using Dalamud.Game.Text.SeStringHandling; using Dalamud.Plugin.Services; using FFXIVClientStructs.FFXIV.Client.Game; +using Lumina.Excel.Sheets; using Microsoft.Extensions.Logging; using Questionable.Controller.Steps; using Questionable.Controller.Steps.Interactions; @@ -828,6 +830,39 @@ internal sealed class QuestController : MiniTaskController } } + private const char ClipboardSeparator = ';'; + public string ExportQuestPriority() + { + return string.Join(ClipboardSeparator, ManualPriorityQuests.Select(x => x.Id.ToString())); + } + + public void ClearQuestPriority() + { + ManualPriorityQuests.Clear(); + } + + public bool AddQuestPriority(ElementId elementId) + { + if (_questRegistry.TryGetQuest(elementId, out Quest? quest) && !ManualPriorityQuests.Contains(quest)) + ManualPriorityQuests.Add(quest); + return true; + } + + public bool InsertQuestPriority(int index, ElementId elementId) + { + try + { + if (_questRegistry.TryGetQuest(elementId, out Quest? quest) && !ManualPriorityQuests.Contains(quest)) + ManualPriorityQuests.Insert(index, quest); + return true; + } + catch (Exception e) { + _logger.LogError(e, "Failed to insert quest in priority list"); + _chatGui.PrintError("Failed to insert quest in priority list, please check /xllog for details.", CommandHandler.MessageTag, CommandHandler.TagColor); + return false; + } + } + public bool WasLastTaskUpdateWithin(TimeSpan timeSpan) { _logger.LogInformation("Last update: {Update}", _lastTaskUpdate); diff --git a/Questionable/External/QuestionableIpc.cs b/Questionable/External/QuestionableIpc.cs index c2ba2426..835ecbca 100644 --- a/Questionable/External/QuestionableIpc.cs +++ b/Questionable/External/QuestionableIpc.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Numerics; +using Dalamud.Game.ClientState.Objects; using Dalamud.Plugin; using Dalamud.Plugin.Ipc; using JetBrains.Annotations; @@ -23,10 +24,15 @@ internal sealed class QuestionableIpc : IDisposable private const string IpcStartSingleQuest = "Questionable.StartSingleQuest"; private const string IpcIsQuestLocked = "Questionable.IsQuestLocked"; private const string IpcImportQuestPriority = "Questionable.ImportQuestPriority"; + private const string IpcClearQuestPriority = "Questionable.ClearQuestPriority"; + private const string IpcAddQuestPriority = "Questionable.AddQuestPriority"; + private const string IpcInsertQuestPriority = "Questionable.InsertQuestPriority"; + private const string IpcExportQuestPriority = "Questionable.ExportQuestPriority"; private readonly QuestController _questController; private readonly QuestRegistry _questRegistry; private readonly QuestFunctions _questFunctions; + private readonly PriorityWindow _priorityWindow; private readonly ICallGateProvider _isRunning; private readonly ICallGateProvider _getCurrentQuestId; @@ -36,17 +42,23 @@ internal sealed class QuestionableIpc : IDisposable private readonly ICallGateProvider _startSingleQuest; private readonly ICallGateProvider _isQuestLocked; private readonly ICallGateProvider _importQuestPriority; + private readonly ICallGateProvider _addQuestPriority; + private readonly ICallGateProvider _clearQuestPriority; + private readonly ICallGateProvider _insertQuestPriority; + private readonly ICallGateProvider _exportQuestPriority; public QuestionableIpc( QuestController questController, EventInfoComponent eventInfoComponent, QuestRegistry questRegistry, QuestFunctions questFunctions, + PriorityWindow priorityWindow, IDalamudPluginInterface pluginInterface) { _questController = questController; _questRegistry = questRegistry; _questFunctions = questFunctions; + _priorityWindow = priorityWindow; _isRunning = pluginInterface.GetIpcProvider(IpcIsRunning); _isRunning.RegisterFunc(() => @@ -68,13 +80,24 @@ internal sealed class QuestionableIpc : IDisposable _startSingleQuest = pluginInterface.GetIpcProvider(IpcStartSingleQuest); _startSingleQuest.RegisterFunc(questId => StartQuest(questId, true)); - //_startSingleQuest.RegisterFunc((questId) => StartQuest(questController, questRegistry, questId, true)); _isQuestLocked = pluginInterface.GetIpcProvider(IpcIsQuestLocked); _isQuestLocked.RegisterFunc((questId) => IsQuestLocked(questId)); _importQuestPriority = pluginInterface.GetIpcProvider(IpcImportQuestPriority); _importQuestPriority.RegisterFunc((encodedQuestPriority) => ImportQuestPriority(encodedQuestPriority)); + + _importQuestPriority = pluginInterface.GetIpcProvider(IpcAddQuestPriority); + _importQuestPriority.RegisterFunc((questId) => AddQuestPriority(questId)); + + _clearQuestPriority = pluginInterface.GetIpcProvider(IpcClearQuestPriority); + _clearQuestPriority.RegisterFunc(ClearQuestPriority); + + _insertQuestPriority = pluginInterface.GetIpcProvider(IpcInsertQuestPriority); + _insertQuestPriority.RegisterFunc((index, questId) => InsertQuestPriority(index, questId)); + + _exportQuestPriority = pluginInterface.GetIpcProvider(IpcExportQuestPriority); + _exportQuestPriority.RegisterFunc(_priorityWindow.EncodeQuestPriority); } private bool StartQuest(string questId, bool single) @@ -130,11 +153,37 @@ internal sealed class QuestionableIpc : IDisposable private bool ImportQuestPriority(string encodedQuestPriority) { - List questElements = PriorityWindow.ParseQuestPriority(encodedQuestPriority); + List questElements = PriorityWindow.DecodeQuestPriority(encodedQuestPriority); _questController.ImportQuestPriority(questElements); return true; } + private bool ClearQuestPriority() + { + _questController.ClearQuestPriority(); + return true; + } + + private bool AddQuestPriority(string questId) + { + if (ElementId.TryFromString(questId, out var elementId) && elementId != null && + _questRegistry.TryGetQuest(elementId, out var quest)) + { + return _questController.AddQuestPriority(elementId); + } + return true; + } + + private bool InsertQuestPriority(int index, string questId) + { + if (ElementId.TryFromString(questId, out var elementId) && elementId != null && + _questRegistry.TryGetQuest(elementId, out var quest)) + { + return _questController.InsertQuestPriority(index, elementId); + } + return true; + } + public void Dispose() { _startSingleQuest.UnregisterFunc(); diff --git a/Questionable/Windows/PriorityWindow.cs b/Questionable/Windows/PriorityWindow.cs index 55e74ae5..5cbb6e9d 100644 --- a/Questionable/Windows/PriorityWindow.cs +++ b/Questionable/Windows/PriorityWindow.cs @@ -76,7 +76,7 @@ internal sealed class PriorityWindow : LWindow _questController.ManualPriorityQuests.RemoveAll(q => _questFunctions.IsQuestComplete(q.Id)); ImGui.SameLine(); if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Trash, "Clear")) - _questController.ManualPriorityQuests.Clear(); + _questController.ClearQuestPriority(); ImGui.EndDisabled(); ImGui.Spacing(); @@ -251,10 +251,10 @@ internal sealed class PriorityWindow : LWindow private List ParseClipboardItems() { string? clipboardText = GetClipboardText(); - return ParseQuestPriority(clipboardText); + return DecodeQuestPriority(clipboardText); } - public static List ParseQuestPriority(string? clipboardText) + public static List DecodeQuestPriority(string? clipboardText) { List clipboardItems = new List(); try @@ -278,10 +278,15 @@ internal sealed class PriorityWindow : LWindow return clipboardItems; } + public string EncodeQuestPriority() + { + return ClipboardPrefix + Convert.ToBase64String(Encoding.UTF8.GetBytes( + string.Join(ClipboardSeparator, _questController.ManualPriorityQuests.Select(x => x.Id.ToString())))); + } + private void ExportToClipboard() { - string clipboardText = ClipboardPrefix + Convert.ToBase64String(Encoding.UTF8.GetBytes( - string.Join(ClipboardSeparator, _questController.ManualPriorityQuests.Select(x => x.Id.ToString())))); + string clipboardText = EncodeQuestPriority(); ImGui.SetClipboardText(clipboardText); _chatGui.Print("Copied quests to clipboard.", CommandHandler.MessageTag, CommandHandler.TagColor); } -- 2.47.2