From: Liza Carvelli Date: Tue, 22 Apr 2025 18:16:33 +0000 (+0200) Subject: Automatically close Cosmic Exploration tutorial X-Git-Tag: v5.10^0 X-Git-Url: https://git.jacobcasper.com/?a=commitdiff_plain;h=8baa4c8060cd015d6c5ffcff405c706023717050;p=Questionable.git Automatically close Cosmic Exploration tutorial --- diff --git a/Directory.Build.targets b/Directory.Build.targets index 3630c3cb..e639b5b2 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,5 +1,5 @@ - 5.9 + 5.10 diff --git a/Questionable/Controller/GameUi/HelpUiController.cs b/Questionable/Controller/GameUi/HelpUiController.cs index 504f8cd0..7fd9d070 100644 --- a/Questionable/Controller/GameUi/HelpUiController.cs +++ b/Questionable/Controller/GameUi/HelpUiController.cs @@ -46,6 +46,12 @@ internal sealed class HelpUiController : IDisposable GuidePostSetup(addonGuide); } + if (_gameGui.TryGetAddonByName("ContentsTutorial", out AtkUnitBase* addonContentsTutorial)) + { + _logger.LogInformation("ContentsTutorial window is open"); + ContentsTutorialPostSetup(addonContentsTutorial); + } + if (_gameGui.TryGetAddonByName("JobHudNotice", out AtkUnitBase* addonJobHudNotice)) { _logger.LogInformation("JobHudNotice window is open"); @@ -65,12 +71,14 @@ internal sealed class HelpUiController : IDisposable private unsafe void ContentsTutorialPostSetup(AddonEvent type, AddonArgs args) { - if (_questController.StartedQuest?.Quest.Id.Value is 245 or 3872) - { - _logger.LogInformation("Closing ContentsTutorial"); - AtkUnitBase* addon = (AtkUnitBase*)args.Addon; - addon->FireCallbackInt(13); - } + if (_questController.StartedQuest?.Quest.Id.Value is 245 or 3872 or 5253) + ContentsTutorialPostSetup((AtkUnitBase*)args.Addon); + } + + private unsafe void ContentsTutorialPostSetup(AtkUnitBase* addon) + { + _logger.LogInformation("Closing ContentsTutorial"); + addon->FireCallbackInt(13); } ///