Compare commits

..

17 Commits

Author SHA1 Message Date
Plogon Enjoyer
9611e79cf2 Fixed InteractionType. Changed from "Interact" to "AcceptQuest".
(cherry picked from commit 83c48a8454ea11616e4e72976138616dc33b1f23)
2024-09-30 00:34:32 +08:00
Plogon Enjoyer
46e4ab609e Added the following story quest:
- A Symbiotic Friendship

(cherry picked from commit 65e3417d1ceef875690ea1f99b36387c02c4f03f)
2024-09-30 00:34:19 +08:00
17cfda172b
Add support for Old Sharlayan leves 2024-09-28 23:28:53 +02:00
1d6621132b Merge pull request '[ARR][Allied Society][Amalj'aa] Added new daily quests' (#73) from plogon_enjoyer/Questionable:amaljaa into master
Reviewed-on: liza/Questionable#73
2024-09-28 19:49:13 +00:00
5c1ccf9728 Merge pull request '[SB][Allied Society][Ananta] Added a new story quest' (#70) from plogon_enjoyer/Questionable:ananta into master
Reviewed-on: liza/Questionable#70
2024-09-28 19:45:23 +00:00
1478093941 Merge pull request '[EW][Allied Society][Loporrits] feat: add Loporrits The Incredible machines' (#68) from kaiserbh/Questionable:feat/the-Incredible-machines into master
Reviewed-on: liza/Questionable#68
2024-09-28 19:40:36 +00:00
85292cd40c Merge pull request '[HW][Allied Society][Vanu Vanu] Added new daily quest' (#66) from plogon_enjoyer/Questionable:vanuvanu into master
Reviewed-on: liza/Questionable#66
2024-09-28 19:37:27 +00:00
8178f8b34f Merge pull request '[ShB][Allied Society][Qitari] Added new daily quest' (#64) from plogon_enjoyer/Questionable:qitari into master
Reviewed-on: liza/Questionable#64
2024-09-28 19:34:00 +00:00
619b5431d5
Skip loading unknown quests (e.g. for CN) shipped with the plugin 2024-09-28 15:47:48 +02:00
Plogon Enjoyer
90b543c95a Added new daily quests:
- A Shell to Scry On
- Losing One's Tempered
- Blitzing the Beacons
2024-09-28 17:11:30 +08:00
22949d0e32
Fix 'Bringing out the Dead' 2024-09-26 22:50:05 +02:00
eeea9a66f6
Fix issues in 'Pussyfooting About' 2024-09-26 22:11:05 +02:00
Plogon Enjoyer
ac5f7a4e4f Added story quest:
- Celebratory Smorgasbord
2024-09-27 00:10:33 +08:00
0dde646d2f Merge branch 'master' into feat/the-Incredible-machines 2024-09-26 08:23:54 +00:00
kaiser
228a067231 feat: add Loporrits The Incredible machines 2024-09-26 18:20:00 +10:00
4f6914d835
Extend error toast handling 2024-09-25 20:07:40 +02:00
Plogon Enjoyer
c6739b3cce Updated the following daily quest:
- Serpent's Will Be Done
2024-09-25 00:07:34 +08:00
18 changed files with 860 additions and 48 deletions

View File

@ -0,0 +1,160 @@
{
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/GatheringPaths/gatheringlocation-v1.json",
"Author": "liza",
"Steps": [
{
"TerritoryId": 956,
"InteractionType": "None"
}
],
"Groups": [
{
"Nodes": [
{
"DataId": 34281,
"Locations": [
{
"Position": {
"X": -510.2663,
"Y": -20.72923,
"Z": -119.9257
},
"MinimumAngle": -120,
"MaximumAngle": 10
}
]
}
]
},
{
"Nodes": [
{
"DataId": 34283,
"Locations": [
{
"Position": {
"X": -502.4525,
"Y": -18.55583,
"Z": -139.683
},
"MinimumAngle": -95,
"MaximumAngle": -35,
"MinimumDistance": 1,
"MaximumDistance": 1.8
}
]
}
]
},
{
"Nodes": [
{
"DataId": 34284,
"Locations": [
{
"Position": {
"X": -499.3535,
"Y": -18.75164,
"Z": -141.9256
},
"MinimumAngle": -75,
"MaximumAngle": 15,
"MinimumDistance": 1,
"MaximumDistance": 2.3
}
]
}
]
},
{
"Nodes": [
{
"DataId": 34285,
"Locations": [
{
"Position": {
"X": -495.1168,
"Y": -18.65139,
"Z": -142.5636
},
"MinimumAngle": -85,
"MaximumAngle": 45
}
]
}
]
},
{
"Nodes": [
{
"DataId": 34286,
"Locations": [
{
"Position": {
"X": -491.4826,
"Y": -19.44574,
"Z": -144.2088
},
"MinimumAngle": -105,
"MaximumAngle": 25
}
]
}
]
},
{
"Nodes": [
{
"DataId": 34287,
"Locations": [
{
"Position": {
"X": -488.8665,
"Y": -19.70717,
"Z": -147.403
},
"MinimumAngle": 230,
"MaximumAngle": 340
}
]
}
]
},
{
"Nodes": [
{
"DataId": 34289,
"Locations": [
{
"Position": {
"X": -489.1829,
"Y": -19.91622,
"Z": -153.7781
},
"MinimumAngle": 200,
"MaximumAngle": 320
}
]
}
]
},
{
"Nodes": [
{
"DataId": 34291,
"Locations": [
{
"Position": {
"X": -490.1324,
"Y": -18.06493,
"Z": -164.4281
},
"MinimumAngle": 210,
"MaximumAngle": 310
}
]
}
]
}
]
}

View File

@ -0,0 +1,76 @@
{
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "plogon_enjoyer",
"QuestSequence": [
{
"Sequence": 0,
"Steps": [
{
"DataId": 1005550,
"Position": {
"X": 105.27197,
"Y": 15.359643,
"Z": -357.3816
},
"TerritoryId": 146,
"InteractionType": "AcceptQuest"
}
]
},
{
"Sequence": 1,
"Steps": [
{
"Position": {
"X": -84.12953,
"Y": -14.744684,
"Z": -148.0814
},
"TerritoryId": 146,
"InteractionType": "Combat",
"EnemySpawnType": "OverworldEnemies",
"ComplexCombatData": [
{
"DataId": 134,
"MinimumKillCount": 2
}
],
"Fly": true
},
{
"Position": {
"X": -253.56975,
"Y": 6.8785334,
"Z": 162.0949
},
"TerritoryId": 146,
"InteractionType": "Combat",
"EnemySpawnType": "OverworldEnemies",
"ComplexCombatData": [
{
"DataId": 358,
"MinimumKillCount": 1
}
],
"Fly": true
}
]
},
{
"Sequence": 255,
"Steps": [
{
"DataId": 1005550,
"Position": {
"X": 105.27197,
"Y": 15.359643,
"Z": -357.3816
},
"TerritoryId": 146,
"InteractionType": "CompleteQuest",
"Fly": true
}
]
}
]
}

View File

@ -0,0 +1,114 @@
{
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "plogon_enjoyer",
"QuestSequence": [
{
"Sequence": 0,
"Steps": [
{
"DataId": 1005550,
"Position": {
"X": 105.27197,
"Y": 15.359643,
"Z": -357.3816
},
"TerritoryId": 146,
"InteractionType": "AcceptQuest"
}
]
},
{
"Sequence": 1,
"Steps": [
{
"DataId": 2003169,
"Position": {
"X": -191.18036,
"Y": 3.6774292,
"Z": -162.00513
},
"TerritoryId": 146,
"InteractionType": "Combat",
"EnemySpawnType": "AfterInteraction",
"KillEnemyDataIds": [80],
"Fly": true
},
{
"DataId": 80,
"Position": {
"X": -198.6194,
"Y": 4.4395595,
"Z": -156.7357
},
"TerritoryId": 146,
"InteractionType": "UseItem",
"ItemId": 2001191
},
{
"DataId": 2003168,
"Position": {
"X": -155.44366,
"Y": 3.8604736,
"Z": -132.21948
},
"TerritoryId": 146,
"InteractionType": "Combat",
"EnemySpawnType": "AfterInteraction",
"KillEnemyDataIds": [80],
"Fly": true
},
{
"DataId": 80,
"Position": {
"X": -159.83832,
"Y": 4.2440715,
"Z": -136.43097
},
"TerritoryId": 146,
"InteractionType": "UseItem",
"ItemId": 2001191
},
{
"DataId": 2003172,
"Position": {
"X": -19.36377,
"Y": 0.47296143,
"Z": 15.182739
},
"TerritoryId": 146,
"InteractionType": "Combat",
"EnemySpawnType": "AfterInteraction",
"KillEnemyDataIds": [80],
"Fly": true
},
{
"DataId": 81,
"Position": {
"X": -19.760498,
"Y": 0.97421986,
"Z": 19.790894
},
"TerritoryId": 146,
"InteractionType": "UseItem",
"ItemId": 2001191
}
]
},
{
"Sequence": 255,
"Steps": [
{
"DataId": 1005550,
"Position": {
"X": 105.27197,
"Y": 15.359643,
"Z": -357.3816
},
"TerritoryId": 146,
"InteractionType": "CompleteQuest",
"Fly": true
}
]
}
]
}

View File

@ -0,0 +1,68 @@
{
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "plogon_enjoyer",
"QuestSequence": [
{
"Sequence": 0,
"Steps": [
{
"DataId": 1005550,
"Position": {
"X": 105.27197,
"Y": 15.359643,
"Z": -357.3816
},
"TerritoryId": 146,
"InteractionType": "AcceptQuest"
}
]
},
{
"Sequence": 1,
"Steps": [
{
"Position": {
"X": -9.631764,
"Y": 4.530592,
"Z": -52.115612
},
"TerritoryId": 146,
"InteractionType": "Combat",
"EnemySpawnType": "OverworldEnemies",
"ComplexCombatData": [
{
"DataId": 2452,
"MinimumKillCount": 2
}
],
"Fly": true
}
]
},
{
"Sequence": 255,
"Steps": [
{
"Position": {
"X": -74.8761,
"Y": -1.9533517,
"Z": -51.731575
},
"TerritoryId": 146,
"InteractionType": "WalkTo"
},
{
"DataId": 1005550,
"Position": {
"X": 105.27197,
"Y": 15.359643,
"Z": -357.3816
},
"TerritoryId": 146,
"InteractionType": "CompleteQuest",
"Fly": true
}
]
}
]
}

View File

@ -269,7 +269,8 @@
"Z": -353.6584 "Z": -353.6584
}, },
"TerritoryId": 140, "TerritoryId": 140,
"InteractionType": "Interact" "InteractionType": "Interact",
"DisableNavmesh": true
} }
] ]
}, },

View File

@ -1,5 +1,5 @@
{ {
"$schema": "https://git.carvel.li/plogon_enjoyer/Questionable/raw/branch/temp/QuestPaths/quest-v1.json", "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "plogon_enjoyer", "Author": "plogon_enjoyer",
"QuestSequence": [ "QuestSequence": [
{ {
@ -100,7 +100,7 @@
"Z": -404.1352 "Z": -404.1352
}, },
"TerritoryId": 401, "TerritoryId": 401,
"InteractionType": "Interact", "InteractionType": "CompleteQuest",
"AetheryteShortcut": "The Sea of Clouds - Ok' Zundu", "AetheryteShortcut": "The Sea of Clouds - Ok' Zundu",
"Fly": true "Fly": true
} }

View File

@ -0,0 +1,37 @@
{
"$schema": "https://git.carvel.li/plogon_enjoyer/Questionable/raw/branch/temp/QuestPaths/quest-v1.json",
"Author": "plogon_enjoyer",
"QuestSequence": [
{
"Sequence": 0,
"Steps": [
{
"DataId": 1016802,
"Position": {
"X": 53.360718,
"Y": -48.000004,
"Z": -169.97028
},
"TerritoryId": 398,
"InteractionType": "AcceptQuest"
}
]
},
{
"Sequence": 255,
"Steps": [
{
"DataId": 1011928,
"Position": {
"X": 73.19751,
"Y": -49.19563,
"Z": -139.05548
},
"TerritoryId": 398,
"InteractionType": "CompleteQuest",
"Fly": true
}
]
}
]
}

View File

@ -0,0 +1,98 @@
{
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "plogon_enjoyer",
"QuestSequence": [
{
"Sequence": 0,
"Steps": [
{
"DataId": 1024771,
"Position": {
"X": 12.008789,
"Y": 55.97821,
"Z": 237.96448
},
"TerritoryId": 612,
"InteractionType": "AcceptQuest"
}
]
},
{
"Sequence": 1,
"Steps": [
{
"DataId": 1023142,
"Position": {
"X": -642.9083,
"Y": 130.25946,
"Z": -538.29254
},
"TerritoryId": 612,
"InteractionType": "Interact",
"Fly": true,
"AetheryteShortcut": "Fringes - Castrum Oriens"
},
{
"DataId": 1024937,
"Position": {
"X": 450.88867,
"Y": 114.36421,
"Z": 235.91968
},
"TerritoryId": 612,
"InteractionType": "Interact",
"Fly": true,
"AetheryteShortcut": "Fringes - Peering Stones"
}
]
},
{
"Sequence": 2,
"Steps": [
{
"DataId": 1024952,
"Position": {
"X": 12.008789,
"Y": 55.97821,
"Z": 237.96448
},
"TerritoryId": 612,
"InteractionType": "Interact",
"Fly": true
}
]
},
{
"Sequence": 3,
"Steps": [
{
"DataId": 1025235,
"Position": {
"X": -155.2301,
"Y": 39.096687,
"Z": 159.0448
},
"TerritoryId": 612,
"InteractionType": "Interact",
"Fly": true
}
]
},
{
"Sequence": 255,
"Steps": [
{
"DataId": 1024952,
"Position": {
"X": 12.008789,
"Y": 55.97821,
"Z": 237.96448
},
"TerritoryId": 612,
"InteractionType": "CompleteQuest",
"Fly": true
}
]
}
]
}

View File

@ -1,7 +1,6 @@
{ {
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json", "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "liza", "Author": "plogon_enjoyer",
"Disabled": true,
"QuestSequence": [ "QuestSequence": [
{ {
"Sequence": 0, "Sequence": 0,
@ -18,6 +17,39 @@
} }
] ]
}, },
{
"Sequence": 1,
"Steps": [
{
"DataId": 1032663,
"Position": {
"X": 793.97266,
"Y": -45.811764,
"Z": -188.03699
},
"TerritoryId": 817,
"InteractionType": "Interact",
"Fly": true
}
]
},
{
"Sequence": 2,
"Steps": [
{
"DataId": 2010998,
"Position": {
"X": -677.0886,
"Y": 0.32037354,
"Z": 208.69751
},
"TerritoryId": 817,
"InteractionType": "Action",
"Action": "Peculiar Light",
"Fly": true
}
]
},
{ {
"Sequence": 255, "Sequence": 255,
"Steps": [ "Steps": [

View File

@ -0,0 +1,147 @@
{
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "kaiser",
"QuestSequence": [
{
"Sequence": 0,
"Steps": [
{
"Position": {
"X": -193.89642,
"Y": -49.19972,
"Z": -262.13477
},
"TerritoryId": 959,
"InteractionType": "None",
"AetheryteShortcut": "Mare Lamentorum - Bestways Burrow",
"Fly": true,
"StopDistance": 5,
"SkipConditions": {
"AetheryteShortcutIf": {
"NearPosition": {
"Position": {
"X": -193.89642,
"Y": -49.19972,
"Z": -262.13477
},
"TerritoryId": 959,
"MaximumDistance": 100
}
}
}
}
,
{
"DataId": 1044402,
"Position": {
"X": -193.89642,
"Y": -49.19972,
"Z": -262.13477
},
"TerritoryId": 959,
"InteractionType": "AcceptQuest",
"StopDistance": 5,
"Fly": true
}
]
},
{
"Sequence": 1,
"Steps": [
{
"DataId": 1044924,
"Position": {
"X": 344.625,
"Y": -168.00002,
"Z": -403.89105
},
"TerritoryId": 959,
"InteractionType": "Interact",
"StopDistance": 5,
"AetheryteShortcut": "Mare Lamentorum - Bestways Burrow",
"Fly": true,
"SkipConditions": {
"AetheryteShortcutIf": {
"InSameTerritory": true
}
}
}
]
},
{
"Sequence": 2,
"Steps": [
{
"DataId": 1044926,
"Position": {
"X": 500.96887,
"Y": -164.43474,
"Z": -698.3902
},
"TerritoryId": 959,
"InteractionType": "Interact",
"StopDistance": 5,
"AetheryteShortcut": "Mare Lamentorum - Bestways Burrow",
"Fly": true,
"SkipConditions": {
"AetheryteShortcutIf": {
"InSameTerritory": true
}
}
}
]
},
{
"Sequence": 3,
"Steps": [
{
"DataId": 1044928,
"Position": {
"X": -172.74744,
"Y": -49.199722,
"Z": -250.8736
},
"TerritoryId": 959,
"InteractionType": "Interact",
"StopDistance": 5,
"AetheryteShortcut": "Mare Lamentorum - Bestways Burrow",
"Fly": true,
"SkipConditions": {
"AetheryteShortcutIf": {
"InSameTerritory": true
}
}
}
]
},
{
"Sequence": 255,
"Steps": [
{
"TerritoryId": 959,
"InteractionType": "Craft",
"ItemId": 38845,
"ItemCount": 2
},
{
"DataId": 1044928,
"Position": {
"X": -172.74744,
"Y": -49.199722,
"Z": -250.8736
},
"TerritoryId": 959,
"InteractionType": "CompleteQuest",
"StopDistance": 5,
"AetheryteShortcut": "Mare Lamentorum - Bestways Burrow",
"Fly": true,
"SkipConditions": {
"AetheryteShortcutIf": {
"InSameTerritory": true
}
}
}
]
}
]
}

View File

@ -0,0 +1,38 @@
{
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "liza",
"QuestSequence": [
{
"Sequence": 1,
"Steps": [
{
"Position": {
"X": -506.1484,
"Y": -22.671598,
"Z": -116.16144
},
"TerritoryId": 956,
"InteractionType": "InitiateLeve",
"AetheryteShortcut": "Labyrinthos - Aporia",
"Fly": true,
"SkipConditions": {
"AetheryteShortcutIf": {
"InSameTerritory": true
}
}
},
{
"TerritoryId": 956,
"InteractionType": "Gather",
"ItemsToGather": [
{
"ItemId": 2003172,
"AlternativeItemId": 2003173,
"ItemCount": 999
}
]
}
]
}
]
}

View File

@ -51,7 +51,7 @@ internal sealed unsafe class GatheringController : MiniTaskController<GatheringC
IServiceProvider serviceProvider, IServiceProvider serviceProvider,
IDataManager dataManager, IDataManager dataManager,
IPluginLog pluginLog) IPluginLog pluginLog)
: base(chatGui, condition, serviceProvider, logger) : base(chatGui, condition, serviceProvider, dataManager, logger)
{ {
_movementController = movementController; _movementController = movementController;
_gatheringPointRegistry = gatheringPointRegistry; _gatheringPointRegistry = gatheringPointRegistry;

View File

@ -2,14 +2,18 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using Dalamud.Game.ClientState.Conditions; using Dalamud.Game.ClientState.Conditions;
using Dalamud.Game.Text.SeStringHandling;
using Dalamud.Plugin.Services; using Dalamud.Plugin.Services;
using LLib;
using Lumina.Excel.GeneratedSheets;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Questionable.Controller.Steps; using Questionable.Controller.Steps;
using Questionable.Controller.Steps.Common;
using Questionable.Controller.Steps.Interactions; using Questionable.Controller.Steps.Interactions;
using Questionable.Controller.Steps.Shared; using Questionable.Controller.Steps.Shared;
using Questionable.Functions;
using Questionable.Model.Questing; using Questionable.Model.Questing;
using Mount = Questionable.Controller.Steps.Common.Mount;
namespace Questionable.Controller; namespace Questionable.Controller;
@ -22,13 +26,17 @@ internal abstract class MiniTaskController<T>
private readonly IServiceProvider _serviceProvider; private readonly IServiceProvider _serviceProvider;
private readonly ILogger<T> _logger; private readonly ILogger<T> _logger;
private readonly string _actionCanceledText;
protected MiniTaskController(IChatGui chatGui, ICondition condition, IServiceProvider serviceProvider, protected MiniTaskController(IChatGui chatGui, ICondition condition, IServiceProvider serviceProvider,
ILogger<T> logger) IDataManager dataManager, ILogger<T> logger)
{ {
_chatGui = chatGui; _chatGui = chatGui;
_logger = logger; _logger = logger;
_serviceProvider = serviceProvider; _serviceProvider = serviceProvider;
_condition = condition; _condition = condition;
_actionCanceledText = dataManager.GetString<LogMessage>(1314, x => x.Text)!;
} }
protected virtual void UpdateCurrentTask() protected virtual void UpdateCurrentTask()
@ -172,4 +180,22 @@ internal abstract class MiniTaskController<T>
foreach (ITask task in _taskQueue.RemainingTasks) foreach (ITask task in _taskQueue.RemainingTasks)
_logger.LogInformation("- {TaskName}", task); _logger.LogInformation("- {TaskName}", task);
} }
public void OnErrorToast(ref SeString message, ref bool isHandled)
{
if (_taskQueue.CurrentTaskExecutor is IToastAware toastAware)
{
if (toastAware.OnErrorToast(message))
{
isHandled = true;
}
}
if (!isHandled)
{
if (GameFunctions.GameStringEquals(_actionCanceledText, message.TextValue) &&
!_condition[ConditionFlag.InFlight])
InterruptQueueWithCombat();
}
}
} }

View File

@ -43,8 +43,6 @@ internal sealed class QuestController : MiniTaskController<QuestController>, IDi
private readonly TaskCreator _taskCreator; private readonly TaskCreator _taskCreator;
private readonly ILogger<QuestController> _logger; private readonly ILogger<QuestController> _logger;
private readonly string _actionCanceledText;
private readonly object _progressLock = new(); private readonly object _progressLock = new();
private QuestProgress? _startedQuest; private QuestProgress? _startedQuest;
@ -84,7 +82,7 @@ internal sealed class QuestController : MiniTaskController<QuestController>, IDi
TaskCreator taskCreator, TaskCreator taskCreator,
IServiceProvider serviceProvider, IServiceProvider serviceProvider,
IDataManager dataManager) IDataManager dataManager)
: base(chatGui, condition, serviceProvider, logger) : base(chatGui, condition, serviceProvider, dataManager, logger)
{ {
_clientState = clientState; _clientState = clientState;
_gameFunctions = gameFunctions; _gameFunctions = gameFunctions;
@ -105,8 +103,6 @@ internal sealed class QuestController : MiniTaskController<QuestController>, IDi
_condition.ConditionChange += OnConditionChange; _condition.ConditionChange += OnConditionChange;
_toastGui.Toast += OnNormalToast; _toastGui.Toast += OnNormalToast;
_toastGui.ErrorToast += OnErrorToast; _toastGui.ErrorToast += OnErrorToast;
_actionCanceledText = dataManager.GetString<LogMessage>(1314, x => x.Text)!;
} }
public EAutomationType AutomationType public EAutomationType AutomationType
@ -809,24 +805,6 @@ internal sealed class QuestController : MiniTaskController<QuestController>, IDi
_gatheringController.OnNormalToast(message); _gatheringController.OnNormalToast(message);
} }
private void OnErrorToast(ref SeString message, ref bool isHandled)
{
if (_taskQueue.CurrentTaskExecutor is IToastAware toastAware)
{
if (toastAware.OnErrorToast(message))
{
isHandled = true;
}
}
if (!isHandled)
{
if (GameFunctions.GameStringEquals(_actionCanceledText, message.TextValue) &&
!_condition[ConditionFlag.InFlight])
InterruptQueueWithCombat();
}
}
public void Dispose() public void Dispose()
{ {
_toastGui.ErrorToast -= OnErrorToast; _toastGui.ErrorToast -= OnErrorToast;

View File

@ -91,6 +91,8 @@ internal sealed class QuestRegistry
_logger.LogInformation("Loading quests from assembly"); _logger.LogInformation("Loading quests from assembly");
foreach ((ElementId questId, QuestRoot questRoot) in AssemblyQuestLoader.GetQuests()) foreach ((ElementId questId, QuestRoot questRoot) in AssemblyQuestLoader.GetQuests())
{
try
{ {
var questInfo = _questData.GetQuestInfo(questId); var questInfo = _questData.GetQuestInfo(questId);
if (questInfo is LeveInfo leveInfo) if (questInfo is LeveInfo leveInfo)
@ -104,6 +106,11 @@ internal sealed class QuestRegistry
}; };
_quests[quest.Id] = quest; _quests[quest.Id] = quest;
} }
catch (Exception e)
{
_logger.LogWarning("Not loading unknown quest {QuestId} from assembly: {Message}", questId, e.Message);
}
}
_logger.LogInformation("Loaded {Count} quests from assembly", _quests.Count); _logger.LogInformation("Loaded {Count} quests from assembly", _quests.Count);
} }

View File

@ -2,6 +2,7 @@
using System.Linq; using System.Linq;
using System.Numerics; using System.Numerics;
using Dalamud.Game.ClientState.Objects.Enums; using Dalamud.Game.ClientState.Objects.Enums;
using Dalamud.Game.Text.SeStringHandling;
using Dalamud.Plugin.Services; using Dalamud.Plugin.Services;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Questionable.Controller.Steps.Shared; using Questionable.Controller.Steps.Shared;
@ -26,7 +27,7 @@ internal static class MoveToLandingLocation
MoveTo.MoveExecutor moveExecutor, MoveTo.MoveExecutor moveExecutor,
GameFunctions gameFunctions, GameFunctions gameFunctions,
IObjectTable objectTable, IObjectTable objectTable,
ILogger<MoveToLandingLocationExecutor> logger) : TaskExecutor<Task> ILogger<MoveToLandingLocationExecutor> logger) : TaskExecutor<Task>, IToastAware
{ {
private ITask _moveTask = null!; private ITask _moveTask = null!;
@ -57,5 +58,6 @@ internal static class MoveToLandingLocation
} }
public override ETaskResult Update() => moveExecutor.Update(); public override ETaskResult Update() => moveExecutor.Update();
public bool OnErrorToast(SeString message) => moveExecutor.OnErrorToast(message);
} }
} }

View File

@ -2,6 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using Dalamud.Game.Text; using Dalamud.Game.Text;
using Dalamud.Game.Text.SeStringHandling;
using Dalamud.Plugin.Services; using Dalamud.Plugin.Services;
using FFXIVClientStructs.FFXIV.Application.Network.WorkDefinitions; using FFXIVClientStructs.FFXIV.Application.Network.WorkDefinitions;
using FFXIVClientStructs.FFXIV.Client.Game; using FFXIVClientStructs.FFXIV.Client.Game;
@ -124,7 +125,8 @@ internal static class Gather
} }
} }
internal sealed class StartGathering(GatheringController gatheringController) : TaskExecutor<GatheringTask> internal sealed class StartGathering(GatheringController gatheringController) : TaskExecutor<GatheringTask>,
IToastAware
{ {
protected override bool Start() protected override bool Start()
{ {
@ -140,6 +142,13 @@ internal static class Gather
return ETaskResult.StillRunning; return ETaskResult.StillRunning;
} }
public bool OnErrorToast(SeString message)
{
bool isHandled = false;
gatheringController.OnErrorToast(ref message, ref isHandled);
return isHandled;
}
} }
/// <summary> /// <summary>

View File

@ -13,7 +13,16 @@ internal sealed class LeveData
{ {
private static readonly List<LeveStepData> Leves = private static readonly List<LeveStepData> Leves =
[ [
new(EAetheryteLocation.Tuliyollal, 1048390, new(15.243713f, -14.000001f, 85.83191f)), new(
aetheryteLocation: EAetheryteLocation.OldSharlayan,
aethernetShortcut: new AethernetShortcut
{ From = EAetheryteLocation.OldSharlayan, To = EAetheryteLocation.OldSharlayanScholarsHarbor },
issuerDataId: 1037263,
issuerPosition: new(45.818386f, -15.646993f, 109.40509f)),
new(aetheryteLocation: EAetheryteLocation.Tuliyollal,
aethernetShortcut: null,
issuerDataId: 1048390,
issuerPosition: new(15.243713f, -14.000001f, 85.83191f)),
]; ];
private readonly AetheryteData _aetheryteData; private readonly AetheryteData _aetheryteData;
@ -44,6 +53,7 @@ internal sealed class LeveData
TerritoryId = _aetheryteData.TerritoryIds[leveStepData.AetheryteLocation], TerritoryId = _aetheryteData.TerritoryIds[leveStepData.AetheryteLocation],
InteractionType = EInteractionType.AcceptLeve, InteractionType = EInteractionType.AcceptLeve,
AetheryteShortcut = leveStepData.AetheryteLocation, AetheryteShortcut = leveStepData.AetheryteLocation,
AethernetShortcut = leveStepData.AethernetShortcut,
SkipConditions = new() SkipConditions = new()
{ {
AetheryteShortcutIf = new() AetheryteShortcutIf = new()
@ -71,6 +81,7 @@ internal sealed class LeveData
TerritoryId = _aetheryteData.TerritoryIds[leveStepData.AetheryteLocation], TerritoryId = _aetheryteData.TerritoryIds[leveStepData.AetheryteLocation],
InteractionType = EInteractionType.CompleteLeve, InteractionType = EInteractionType.CompleteLeve,
AetheryteShortcut = leveStepData.AetheryteLocation, AetheryteShortcut = leveStepData.AetheryteLocation,
AethernetShortcut = leveStepData.AethernetShortcut,
SkipConditions = new() SkipConditions = new()
{ {
AetheryteShortcutIf = new() AetheryteShortcutIf = new()
@ -93,10 +104,16 @@ internal sealed class LeveData
private readonly uint? _crafterTurnInDataId; private readonly uint? _crafterTurnInDataId;
private readonly Vector3? _crafterTurnInPosition; private readonly Vector3? _crafterTurnInPosition;
public LeveStepData(EAetheryteLocation aetheryteLocation, uint issuerDataId, Vector3 issuerPosition, public LeveStepData(EAetheryteLocation aetheryteLocation,
uint? turnInDataId = null, Vector3? turnInPosition = null, AethernetShortcut? aethernetShortcut,
uint? gathererTurnInDataId = null, Vector3? gathererTurnInPosition = null, uint issuerDataId,
uint? crafterTurnInDataId = null, Vector3? crafterTurnInPosition = null) Vector3 issuerPosition,
uint? turnInDataId = null,
Vector3? turnInPosition = null,
uint? gathererTurnInDataId = null,
Vector3? gathererTurnInPosition = null,
uint? crafterTurnInDataId = null,
Vector3? crafterTurnInPosition = null)
{ {
_turnInDataId = turnInDataId; _turnInDataId = turnInDataId;
_turnInPosition = turnInPosition; _turnInPosition = turnInPosition;
@ -105,11 +122,13 @@ internal sealed class LeveData
_crafterTurnInDataId = crafterTurnInDataId; _crafterTurnInDataId = crafterTurnInDataId;
_crafterTurnInPosition = crafterTurnInPosition; _crafterTurnInPosition = crafterTurnInPosition;
AetheryteLocation = aetheryteLocation; AetheryteLocation = aetheryteLocation;
AethernetShortcut = aethernetShortcut;
IssuerDataId = issuerDataId; IssuerDataId = issuerDataId;
IssuerPosition = issuerPosition; IssuerPosition = issuerPosition;
} }
public EAetheryteLocation AetheryteLocation { get; } public EAetheryteLocation AetheryteLocation { get; }
public AethernetShortcut? AethernetShortcut { get; }
public uint IssuerDataId { get; } public uint IssuerDataId { get; }
public Vector3 IssuerPosition { get; } public Vector3 IssuerPosition { get; }