"Z": 143.63306
},
"TerritoryId": 183,
- "InteractionType": "AcceptQuest"
+ "InteractionType": "AcceptQuest",
+ "DialogueChoices": [
+ {
+ "Type": "List",
+ "ExcelSheet": "opening/OpeningGridania",
+ "Prompt": "TEXT_OPENINGGRIDANIA_FST_SYSTEM_Q_01",
+ "Answer": "TEXT_OPENINGGRIDANIA_FST_SYSTEM_A_01"
+ }
+ ]
}
]
},
"Z": -4.9592285
},
"TerritoryId": 181,
- "InteractionType": "AcceptQuest"
+ "InteractionType": "AcceptQuest",
+ "DialogueChoices": [
+ {
+ "Type": "List",
+ "ExcelSheet": "opening/OpeningLimsaLominsa",
+ "Prompt": "TEXT_OPENINGLIMSALOMINSA_FST_SYSTEM_Q_01",
+ "Answer": "TEXT_OPENINGLIMSALOMINSA_FST_SYSTEM_A_01"
+ }
+ ]
}
]
},
"Z": -151.99518
},
"TerritoryId": 182,
- "InteractionType": "AcceptQuest"
+ "InteractionType": "AcceptQuest",
+ "DialogueChoices": [
+ {
+ "Type": "List",
+ "ExcelSheet": "opening/OpeningUldah",
+ "Prompt": "TEXT_OPENINGULDAH_FST_SYSTEM_Q_01",
+ "Answer": "TEXT_OPENINGULDAH_FST_SYSTEM_A_01"
+ }
+ ]
}
]
},
_returnRegex = _dataManager.GetExcelSheet<Addon>().GetRow(196).GetRegex(addon => addon.Text, pluginLog)!;
_purchaseItemRegex = _dataManager.GetRegex<Addon>(3406, addon => addon.Text, pluginLog)!;
+ _questController.AutomationTypeChanged += HandleCurrentDialogueChoices;
_addonLifecycle.RegisterListener(AddonEvent.PostSetup, "SelectString", SelectStringPostSetup);
_addonLifecycle.RegisterListener(AddonEvent.PostSetup, "CutSceneSelectString", CutsceneSelectStringPostSetup);
_addonLifecycle.RegisterListener(AddonEvent.PostSetup, "SelectIconString", SelectIconStringPostSetup);
_questController.IsRunning ||
_territoryData.IsQuestBattleInstance(_clientState.TerritoryType);
+ private void HandleCurrentDialogueChoices(object sender, QuestController.EAutomationType automationType)
+ {
+ if (automationType != QuestController.EAutomationType.Manual)
+ HandleCurrentDialogueChoices();
+ }
+
internal unsafe void HandleCurrentDialogueChoices()
{
try
_addonLifecycle.UnregisterListener(AddonEvent.PostSetup, "SelectIconString", SelectIconStringPostSetup);
_addonLifecycle.UnregisterListener(AddonEvent.PostSetup, "CutSceneSelectString", CutsceneSelectStringPostSetup);
_addonLifecycle.UnregisterListener(AddonEvent.PostSetup, "SelectString", SelectStringPostSetup);
+ _questController.AutomationTypeChanged -= HandleCurrentDialogueChoices;
}
private sealed record DialogueChoiceInfo(Quest? Quest, DialogueChoice DialogueChoice);
_pluginInterface.UiBuilder.OpenMainUi += ToggleQuestWindow;
_pluginInterface.UiBuilder.OpenConfigUi += _configWindow.Toggle;
_framework.Update += FrameworkUpdate;
- _framework.RunOnTick(interactionUiController.HandleCurrentDialogueChoices, TimeSpan.FromMilliseconds(200));
_toastGui.Toast += OnToast;
_toastGui.ErrorToast += OnErrorToast;
_toastGui.QuestToast += OnQuestToast;