From: Liza Carvelli Date: Fri, 8 Aug 2025 22:38:51 +0000 (+0200) Subject: API 13 X-Git-Tag: v6.0~8 X-Git-Url: https://git.jacobcasper.com/?a=commitdiff_plain;h=0246aa3b3ba12c4048683429a2df3c30989f5249;p=Questionable.git API 13 --- diff --git a/.gitmodules b/.gitmodules index 1bea5203..2b5ab5ea 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,6 +4,3 @@ [submodule "vendor/NotificationMasterAPI"] path = vendor/NotificationMasterAPI url = https://github.com/NightmareXIV/NotificationMasterAPI.git -[submodule "vendor/pictomancy"] - path = vendor/pictomancy - url = https://github.com/sourpuh/ffxiv_pictomancy.git diff --git a/.woodpecker/build.yaml b/.woodpecker/build.yaml index c0717b2b..ebf019fb 100644 --- a/.woodpecker/build.yaml +++ b/.woodpecker/build.yaml @@ -29,7 +29,7 @@ steps: commands: - mkdir release - mv Questionable/dist/Questionable/latest.zip release/Questionable-${CI_COMMIT_TAG##v}.zip - - mv Questionable/dist/Questionable/Questionable.json release/Questionable-${CI_COMMIT_TAG##v}.json.d12 + - mv Questionable/dist/Questionable/Questionable.json release/Questionable-${CI_COMMIT_TAG##v}.json.d13 when: - event: tag ref: refs/tags/v* diff --git a/Directory.Build.targets b/Directory.Build.targets index 79eabc0c..4ff3e944 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,5 +1,5 @@ - 5.23 + 6.0 diff --git a/GatheringPathRenderer/GatheringPathRenderer.csproj b/GatheringPathRenderer/GatheringPathRenderer.csproj index bff37f19..24008b00 100644 --- a/GatheringPathRenderer/GatheringPathRenderer.csproj +++ b/GatheringPathRenderer/GatheringPathRenderer.csproj @@ -1,4 +1,4 @@ - + 0.3 dist @@ -9,7 +9,10 @@ - + + + + diff --git a/GatheringPathRenderer/Windows/ConfigWindow.cs b/GatheringPathRenderer/Windows/ConfigWindow.cs index 0e9ba04c..4d591cd0 100644 --- a/GatheringPathRenderer/Windows/ConfigWindow.cs +++ b/GatheringPathRenderer/Windows/ConfigWindow.cs @@ -1,6 +1,6 @@ -using Dalamud.Interface.Windowing; +using Dalamud.Bindings.ImGui; +using Dalamud.Interface.Windowing; using Dalamud.Plugin; -using ImGuiNET; namespace GatheringPathRenderer.Windows; diff --git a/GatheringPathRenderer/Windows/EditorWindow.cs b/GatheringPathRenderer/Windows/EditorWindow.cs index 913b26c5..664902af 100644 --- a/GatheringPathRenderer/Windows/EditorWindow.cs +++ b/GatheringPathRenderer/Windows/EditorWindow.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Numerics; +using Dalamud.Bindings.ImGui; using Dalamud.Game.ClientState.Objects; using Dalamud.Game.ClientState.Objects.Enums; using Dalamud.Game.ClientState.Objects.Types; @@ -10,7 +11,6 @@ using Dalamud.Interface; using Dalamud.Interface.Colors; using Dalamud.Interface.Windowing; using Dalamud.Plugin.Services; -using ImGuiNET; using Lumina.Excel.Sheets; using Questionable.Model.Gathering; diff --git a/GatheringPathRenderer/packages.lock.json b/GatheringPathRenderer/packages.lock.json index 2aa08db7..842c7d97 100644 --- a/GatheringPathRenderer/packages.lock.json +++ b/GatheringPathRenderer/packages.lock.json @@ -4,9 +4,9 @@ "net9.0-windows7.0": { "DalamudPackager": { "type": "Direct", - "requested": "[12.0.0, )", - "resolved": "12.0.0", - "contentHash": "J5TJLV3f16T/E2H2P17ClWjtfEBPpq3yxvqW46eN36JCm6wR+EaoaYkqG9Rm5sHqs3/nK/vKjWWyvEs/jhKoXw==" + "requested": "[13.0.0, )", + "resolved": "13.0.0", + "contentHash": "Mb3cUDSK/vDPQ8gQIeuCw03EMYrej1B4J44a1AvIJ9C759p9XeqdU9Hg4WgOmlnlPe0G7ILTD32PKSUpkQNa8w==" }, "DotNet.ReproducibleBuilds": { "type": "Direct", @@ -24,6 +24,18 @@ "Microsoft.SourceLink.Common": "8.0.0" } }, + "Pictomancy": { + "type": "Direct", + "requested": "[0.0.1, )", + "resolved": "0.0.1", + "contentHash": "o40yKEYUsUmHLGEyfi2dzrPJBaiYGAL6Jwc32NOZUx9znXvwL0RS2A3AOGzi4wHhTEfTesLuU5yNIs60hT4ayg==", + "dependencies": { + "SharpDX.D3DCompiler": "4.2.0", + "SharpDX.Direct2D1": "4.2.0", + "SharpDX.Direct3D11": "4.2.0", + "SharpDX.Mathematics": "4.2.0" + } + }, "JetBrains.Annotations": { "type": "Transitive", "resolved": "2024.3.0", @@ -263,6 +275,15 @@ "SharpDX": "4.2.0" } }, + "SharpDX.Mathematics": { + "type": "Transitive", + "resolved": "4.2.0", + "contentHash": "R2pcKLgdsP9p5WyTjHmGOZ0ka0zASAZYc6P4L6rSvjYhf6klGYbent7MiVwbkwkt9dD44p5brjy5IwAnVONWGw==", + "dependencies": { + "NETStandard.Library": "1.6.1", + "SharpDX": "4.2.0" + } + }, "System.AppContext": { "type": "Transitive", "resolved": "4.3.0", @@ -991,18 +1012,10 @@ "llib": { "type": "Project", "dependencies": { - "DalamudPackager": "[12.0.0, )", + "DalamudPackager": "[13.0.0, )", "JetBrains.Annotations": "[2024.3.0, )" } }, - "pictomancy": { - "type": "Project", - "dependencies": { - "SharpDX.D3DCompiler": "[4.2.0, )", - "SharpDX.Direct2D1": "[4.2.0, )", - "SharpDX.Direct3D11": "[4.2.0, )" - } - }, "questionable.model": { "type": "Project", "dependencies": { diff --git a/LLib b/LLib index fdadf613..f1716ee4 160000 --- a/LLib +++ b/LLib @@ -1 +1 @@ -Subproject commit fdadf613fe17bfbcf6899e5a60aa1ba5401ed99e +Subproject commit f1716ee4827e68c0c6a601928cc0b479dd7dbccd diff --git a/QuestPaths.JsonValidator/QuestPaths.JsonValidator.csproj b/QuestPaths.JsonValidator/QuestPaths.JsonValidator.csproj index 0bb480e7..140f2482 100644 --- a/QuestPaths.JsonValidator/QuestPaths.JsonValidator.csproj +++ b/QuestPaths.JsonValidator/QuestPaths.JsonValidator.csproj @@ -2,7 +2,7 @@ net9.0 - x64 + x64 enable enable diff --git a/Questionable.IpcTest/Questionable.IpcTest.csproj b/Questionable.IpcTest/Questionable.IpcTest.csproj index 83ca518a..55f0549e 100644 --- a/Questionable.IpcTest/Questionable.IpcTest.csproj +++ b/Questionable.IpcTest/Questionable.IpcTest.csproj @@ -1,4 +1,4 @@ - + dist $(SolutionDir)=X:\ diff --git a/Questionable.IpcTest/packages.lock.json b/Questionable.IpcTest/packages.lock.json index 95bd15e5..0914a4b2 100644 --- a/Questionable.IpcTest/packages.lock.json +++ b/Questionable.IpcTest/packages.lock.json @@ -4,9 +4,9 @@ "net9.0-windows7.0": { "DalamudPackager": { "type": "Direct", - "requested": "[12.0.0, )", - "resolved": "12.0.0", - "contentHash": "J5TJLV3f16T/E2H2P17ClWjtfEBPpq3yxvqW46eN36JCm6wR+EaoaYkqG9Rm5sHqs3/nK/vKjWWyvEs/jhKoXw==" + "requested": "[13.0.0, )", + "resolved": "13.0.0", + "contentHash": "Mb3cUDSK/vDPQ8gQIeuCw03EMYrej1B4J44a1AvIJ9C759p9XeqdU9Hg4WgOmlnlPe0G7ILTD32PKSUpkQNa8w==" }, "DotNet.ReproducibleBuilds": { "type": "Direct", @@ -42,7 +42,7 @@ "llib": { "type": "Project", "dependencies": { - "DalamudPackager": "[12.0.0, )", + "DalamudPackager": "[13.0.0, )", "JetBrains.Annotations": "[2024.3.0, )" } } diff --git a/Questionable.sln b/Questionable.sln index d96384bb..c3c92f15 100644 --- a/Questionable.sln +++ b/Questionable.sln @@ -21,16 +21,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GatheringPathRenderer", "Ga EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{BBFFC6EA-15B1-48FC-B4D3-D9491278C27F}" ProjectSection(SolutionItems) = preProject - Directory.Build.targets = Directory.Build.targets .woodpecker\build.yaml = .woodpecker\build.yaml + Directory.Build.targets = Directory.Build.targets EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "vendor", "vendor", "{8F5EC9D5-4CE7-433B-BB3A-782500E84DDB}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NotificationMasterAPI", "vendor\NotificationMasterAPI\NotificationMasterAPI\NotificationMasterAPI.csproj", "{9BD494ED-22F2-487B-BCE1-435399A8720E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Pictomancy", "vendor\pictomancy\Pictomancy\Pictomancy.csproj", "{D1AE2F8C-BDE7-457F-A369-973101044A25}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Questionable.IpcTest", "Questionable.IpcTest\Questionable.IpcTest.csproj", "{8572A8B2-2F31-4D17-B207-6A7A2E0579EF}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QuestPaths.JsonValidator", "QuestPaths.JsonValidator\QuestPaths.JsonValidator.csproj", "{2521F2BA-9647-4851-92E1-F56280D1663C}" @@ -77,10 +75,6 @@ Global {9BD494ED-22F2-487B-BCE1-435399A8720E}.Debug|x64.Build.0 = Debug|x64 {9BD494ED-22F2-487B-BCE1-435399A8720E}.Release|x64.ActiveCfg = Release|x64 {9BD494ED-22F2-487B-BCE1-435399A8720E}.Release|x64.Build.0 = Release|x64 - {D1AE2F8C-BDE7-457F-A369-973101044A25}.Debug|x64.ActiveCfg = Debug|x64 - {D1AE2F8C-BDE7-457F-A369-973101044A25}.Debug|x64.Build.0 = Debug|x64 - {D1AE2F8C-BDE7-457F-A369-973101044A25}.Release|x64.ActiveCfg = Release|x64 - {D1AE2F8C-BDE7-457F-A369-973101044A25}.Release|x64.Build.0 = Release|x64 {8572A8B2-2F31-4D17-B207-6A7A2E0579EF}.Debug|x64.ActiveCfg = Debug|x64 {8572A8B2-2F31-4D17-B207-6A7A2E0579EF}.Debug|x64.Build.0 = Debug|x64 {8572A8B2-2F31-4D17-B207-6A7A2E0579EF}.Release|x64.ActiveCfg = Release|x64 @@ -95,6 +89,8 @@ Global EndGlobalSection GlobalSection(NestedProjects) = preSolution {9BD494ED-22F2-487B-BCE1-435399A8720E} = {8F5EC9D5-4CE7-433B-BB3A-782500E84DDB} - {D1AE2F8C-BDE7-457F-A369-973101044A25} = {8F5EC9D5-4CE7-433B-BB3A-782500E84DDB} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {E6C60C7E-BEEA-422F-85B3-639BAD5A4B75} EndGlobalSection EndGlobal diff --git a/Questionable/.editorconfig b/Questionable/.editorconfig index 06c844b1..3e92f176 100644 --- a/Questionable/.editorconfig +++ b/Questionable/.editorconfig @@ -462,6 +462,7 @@ dotnet_diagnostic.CA1870.severity = warning # CA2000: Dispose objects before losing scope dotnet_diagnostic.CA2000.severity = warning +dotnet_code_quality.CA2000.excluded_type_names_with_derived_types = Dalamud.Bindings.ImGui.ImU8String # CA2002: Do not lock on objects with weak identity dotnet_diagnostic.CA2002.severity = warning diff --git a/Questionable/Controller/GameUi/CraftworksSupplyController.cs b/Questionable/Controller/GameUi/CraftworksSupplyController.cs index 97c5003f..1fa2859d 100644 --- a/Questionable/Controller/GameUi/CraftworksSupplyController.cs +++ b/Questionable/Controller/GameUi/CraftworksSupplyController.cs @@ -39,7 +39,7 @@ internal sealed class CraftworksSupplyController : IDisposable if (!ShouldHandleUiInteractions) return; - AtkUnitBase* addon = (AtkUnitBase*)args.Addon; + AtkUnitBase* addon = (AtkUnitBase*)args.Addon.Address; InteractWithBankaCraftworksSupply(addon); } @@ -84,7 +84,7 @@ internal sealed class CraftworksSupplyController : IDisposable if (!ShouldHandleUiInteractions) return; - AddonContextIconMenu* addonContextIconMenu = (AddonContextIconMenu*)args.Addon; + AddonContextIconMenu* addonContextIconMenu = (AddonContextIconMenu*)args.Addon.Address; if (!addonContextIconMenu->IsVisible) return; diff --git a/Questionable/Controller/GameUi/CreditsController.cs b/Questionable/Controller/GameUi/CreditsController.cs index 121f5bde..4b3b9a21 100644 --- a/Questionable/Controller/GameUi/CreditsController.cs +++ b/Questionable/Controller/GameUi/CreditsController.cs @@ -29,7 +29,7 @@ internal sealed class CreditsController : IDisposable private unsafe void CreditScrollPostSetup(AddonEvent type, AddonArgs args) { _logger.LogInformation("Closing Credits sequence"); - AtkUnitBase* addon = (AtkUnitBase*)args.Addon; + AtkUnitBase* addon = (AtkUnitBase*)args.Addon.Address; addon->FireCallbackInt(-2); } @@ -39,14 +39,14 @@ internal sealed class CreditsController : IDisposable private unsafe void CreditPostSetup(AddonEvent type, AddonArgs args) { _logger.LogInformation("Closing Credits sequence"); - AtkUnitBase* addon = (AtkUnitBase*)args.Addon; + AtkUnitBase* addon = (AtkUnitBase*)args.Addon.Address; addon->FireCallbackInt(-2); } private unsafe void CreditPlayerPostSetup(AddonEvent type, AddonArgs args) { _logger.LogInformation("Closing CreditPlayer"); - AtkUnitBase* addon = (AtkUnitBase*)args.Addon; + AtkUnitBase* addon = (AtkUnitBase*)args.Addon.Address; addon->Close(true); } diff --git a/Questionable/Controller/GameUi/HelpUiController.cs b/Questionable/Controller/GameUi/HelpUiController.cs index 7fd9d070..3e5585e5 100644 --- a/Questionable/Controller/GameUi/HelpUiController.cs +++ b/Questionable/Controller/GameUi/HelpUiController.cs @@ -13,17 +13,20 @@ internal sealed class HelpUiController : IDisposable private readonly QuestController _questController; private readonly IAddonLifecycle _addonLifecycle; private readonly IGameGui _gameGui; + private readonly IFramework _framework; private readonly ILogger _logger; public HelpUiController( QuestController questController, IAddonLifecycle addonLifecycle, IGameGui gameGui, + IFramework framework, ILogger logger) { _questController = questController; _addonLifecycle = addonLifecycle; _gameGui = gameGui; + _framework = framework; _logger = logger; _questController.AutomationTypeChanged += CloseHelpWindowsWhenStartingQuests; @@ -33,6 +36,7 @@ internal sealed class HelpUiController : IDisposable _addonLifecycle.RegisterListener(AddonEvent.PostSetup, "MultipleHelpWindow", MultipleHelpWindowPostSetup); _addonLifecycle.RegisterListener(AddonEvent.PostSetup, "JobHudNotice", JobHudNoticePostSetup); _addonLifecycle.RegisterListener(AddonEvent.PostSetup, "Guide", GuidePostSetup); + _addonLifecycle.RegisterListener(AddonEvent.PostSetup, "EventTutorial", EventTutorialPostSetup); } private unsafe void CloseHelpWindowsWhenStartingQuests(object sender, QuestController.EAutomationType e) @@ -46,6 +50,12 @@ internal sealed class HelpUiController : IDisposable GuidePostSetup(addonGuide); } + if (_gameGui.TryGetAddonByName("EventTutorial", out AtkUnitBase* addonEventTutorial)) + { + _logger.LogInformation("EventTutorial window is open"); + EventTutorialPostSetup(addonEventTutorial); + } + if (_gameGui.TryGetAddonByName("ContentsTutorial", out AtkUnitBase* addonContentsTutorial)) { _logger.LogInformation("ContentsTutorial window is open"); @@ -64,7 +74,7 @@ internal sealed class HelpUiController : IDisposable if (_questController.StartedQuest?.Quest.Id.Value == 4526) { _logger.LogInformation("Closing Unending Codex"); - AtkUnitBase* addon = (AtkUnitBase*)args.Addon; + AtkUnitBase* addon = (AtkUnitBase*)args.Addon.Address; addon->FireCallbackInt(-2); } } @@ -72,7 +82,7 @@ internal sealed class HelpUiController : IDisposable private unsafe void ContentsTutorialPostSetup(AddonEvent type, AddonArgs args) { if (_questController.StartedQuest?.Quest.Id.Value is 245 or 3872 or 5253) - ContentsTutorialPostSetup((AtkUnitBase*)args.Addon); + ContentsTutorialPostSetup((AtkUnitBase*)args.Addon.Address); } private unsafe void ContentsTutorialPostSetup(AtkUnitBase* addon) @@ -89,7 +99,7 @@ internal sealed class HelpUiController : IDisposable if (_questController.StartedQuest?.Quest.Id.Value == 245) { _logger.LogInformation("Closing MultipleHelpWindow"); - AtkUnitBase* addon = (AtkUnitBase*)args.Addon; + AtkUnitBase* addon = (AtkUnitBase*)args.Addon.Address; addon->FireCallbackInt(-2); addon->FireCallbackInt(-1); } @@ -98,7 +108,7 @@ internal sealed class HelpUiController : IDisposable private unsafe void JobHudNoticePostSetup(AddonEvent type, AddonArgs args) { if (_questController.IsRunning || _questController.AutomationType != QuestController.EAutomationType.Manual) - JobHudNoticePostSetup((AtkUnitBase*)args.Addon); + JobHudNoticePostSetup((AtkUnitBase*)args.Addon.Address); } private unsafe void JobHudNoticePostSetup(AtkUnitBase* addon) @@ -110,7 +120,7 @@ internal sealed class HelpUiController : IDisposable private unsafe void GuidePostSetup(AddonEvent type, AddonArgs args) { if (_questController.IsRunning || _questController.AutomationType != QuestController.EAutomationType.Manual) - GuidePostSetup((AtkUnitBase*)args.Addon); + GuidePostSetup((AtkUnitBase*)args.Addon.Address); } private unsafe void GuidePostSetup(AtkUnitBase* addon) @@ -119,8 +129,29 @@ internal sealed class HelpUiController : IDisposable addon->FireCallbackInt(-1); } + private unsafe void EventTutorialPostSetup(AddonEvent type, AddonArgs args) + { + if (_questController.IsRunning || _questController.AutomationType != QuestController.EAutomationType.Manual) + { + // TODO Verify that this actually works; in initial testing it didn't close the window. + _framework.RunOnTick(() => + { + if (_gameGui.TryGetAddonByName("EventTutorial", out AtkUnitBase* addonEventTutorial)) + EventTutorialPostSetup(addonEventTutorial); + }); + } + } + + private unsafe void EventTutorialPostSetup(AtkUnitBase* addon) + { + _logger.LogInformation("Closing EventTutorial window"); + addon->FireCallbackInt(-1); + } + + public void Dispose() { + _addonLifecycle.UnregisterListener(AddonEvent.PostSetup, "EventTutorial", EventTutorialPostSetup); _addonLifecycle.UnregisterListener(AddonEvent.PostSetup, "Guide", GuidePostSetup); _addonLifecycle.UnregisterListener(AddonEvent.PostSetup, "JobHudNotice", JobHudNoticePostSetup); _addonLifecycle.UnregisterListener(AddonEvent.PostSetup, "MultipleHelpWindow", MultipleHelpWindowPostSetup); diff --git a/Questionable/Controller/GameUi/InteractionUiController.cs b/Questionable/Controller/GameUi/InteractionUiController.cs index 212c5dcc..f3e38205 100644 --- a/Questionable/Controller/GameUi/InteractionUiController.cs +++ b/Questionable/Controller/GameUi/InteractionUiController.cs @@ -164,7 +164,7 @@ internal sealed class InteractionUiController : IDisposable private unsafe void SelectStringPostSetup(AddonEvent type, AddonArgs args) { - AddonSelectString* addonSelectString = (AddonSelectString*)args.Addon; + AddonSelectString* addonSelectString = (AddonSelectString*)args.Addon.Address; SelectStringPostSetup(addonSelectString, false); } @@ -194,7 +194,7 @@ internal sealed class InteractionUiController : IDisposable private unsafe void CutsceneSelectStringPostSetup(AddonEvent type, AddonArgs args) { - AddonCutSceneSelectString* addonCutSceneSelectString = (AddonCutSceneSelectString*)args.Addon; + AddonCutSceneSelectString* addonCutSceneSelectString = (AddonCutSceneSelectString*)args.Addon.Address; CutsceneSelectStringPostSetup(addonCutSceneSelectString, false); } @@ -219,7 +219,7 @@ internal sealed class InteractionUiController : IDisposable private unsafe void SelectIconStringPostSetup(AddonEvent type, AddonArgs args) { - AddonSelectIconString* addonSelectIconString = (AddonSelectIconString*)args.Addon; + AddonSelectIconString* addonSelectIconString = (AddonSelectIconString*)args.Addon.Address; SelectIconStringPostSetup(addonSelectIconString, false); } @@ -526,7 +526,7 @@ internal sealed class InteractionUiController : IDisposable private unsafe void SelectYesnoPostSetup(AddonEvent type, AddonArgs args) { - AddonSelectYesno* addonSelectYesno = (AddonSelectYesno*)args.Addon; + AddonSelectYesno* addonSelectYesno = (AddonSelectYesno*)args.Addon.Address; SelectYesnoPostSetup(addonSelectYesno, false); } @@ -652,12 +652,6 @@ internal sealed class InteractionUiController : IDisposable _logger.LogInformation("SinglePlayerDutyYesNo: probably Single Player Duty"); return true; } - else - { - _logger.LogInformation("SinglePlayerDuty: not enabled"); - return false; - } - } return false; } @@ -695,7 +689,7 @@ internal sealed class InteractionUiController : IDisposable private unsafe void DifficultySelectYesNoPostSetup(AddonEvent type, AddonArgs args) { - AtkUnitBase* addonDifficultySelectYesNo = (AtkUnitBase*)args.Addon; + AtkUnitBase* addonDifficultySelectYesNo = (AtkUnitBase*)args.Addon.Address; DifficultySelectYesNoPostSetup(addonDifficultySelectYesNo, false); } @@ -826,7 +820,7 @@ internal sealed class InteractionUiController : IDisposable private unsafe void PointMenuPostSetup(AddonEvent type, AddonArgs args) { - AtkUnitBase* addonPointMenu = (AtkUnitBase*)args.Addon; + AtkUnitBase* addonPointMenu = (AtkUnitBase*)args.Addon.Address; PointMenuPostSetup(addonPointMenu); } @@ -882,7 +876,7 @@ internal sealed class InteractionUiController : IDisposable return; _logger.LogInformation("Confirming selected housing ward"); - AtkUnitBase* addon = (AtkUnitBase*)args.Addon; + AtkUnitBase* addon = (AtkUnitBase*)args.Addon.Address; addon->FireCallbackInt(0); } diff --git a/Questionable/Controller/NavigationOverrides/MovementOverrideController.cs b/Questionable/Controller/NavigationOverrides/MovementOverrideController.cs index 82590802..950e75d8 100644 --- a/Questionable/Controller/NavigationOverrides/MovementOverrideController.cs +++ b/Questionable/Controller/NavigationOverrides/MovementOverrideController.cs @@ -87,6 +87,11 @@ internal sealed class MovementOverrideController // heritage found: yyupye's halo (farm, npc: Mahuwsa) new BlacklistedPoint(1191, new(-108f, 29.25f, -350.75f), new(-107.56289f, 29.008266f, -348.80087f)), new BlacklistedPoint(1191, new(-105.75f, 29.75f, -351f), new(-105.335304f, 29.017048f, -348.85077f)), + + // solution nine: walks behind the bar in front of the backrooms thing + new BlacklistedPoint(1186, new(284.25f, 50.75f, 171.25f), new(284.25f, 50.75f, 166.25f)), + new BlacklistedPoint(1186, new(283.75f, 50.75f, 167.25f), new(284.25f, 50.75f, 166.25f)), + new BlacklistedPoint(1186, new(287.75f, 51.25f, 172f), new(288.875f, 50.75f, 166.25f)), ]; private readonly IClientState _clientState; diff --git a/Questionable/Controller/Steps/Interactions/EquipItem.cs b/Questionable/Controller/Steps/Interactions/EquipItem.cs index d761926d..151932d9 100644 --- a/Questionable/Controller/Steps/Interactions/EquipItem.cs +++ b/Questionable/Controller/Steps/Interactions/EquipItem.cs @@ -152,7 +152,7 @@ internal static class EquipItem sourceInventoryType, sourceSlot, InventoryType.EquippedItems, targetSlot); int result = inventoryManager->MoveItemSlot(sourceInventoryType, sourceSlot, - InventoryType.EquippedItems, targetSlot, 1); + InventoryType.EquippedItems, targetSlot, true); logger.LogInformation("MoveItemSlot result: {Result}", result); return; } diff --git a/Questionable/Functions/ChatFunctions.cs b/Questionable/Functions/ChatFunctions.cs index a0f935ab..f8226c24 100644 --- a/Questionable/Functions/ChatFunctions.cs +++ b/Questionable/Functions/ChatFunctions.cs @@ -28,7 +28,6 @@ internal sealed unsafe class ChatFunctions private readonly ITargetManager _targetManager; private readonly ILogger _logger; private readonly ProcessChatBoxDelegate _processChatBox; - private readonly delegate* unmanaged _sanitiseString; public ChatFunctions(ISigScanner sigScanner, IDataManager dataManager, GameFunctions gameFunctions, ITargetManager targetManager, ILogger logger) @@ -38,8 +37,6 @@ internal sealed unsafe class ChatFunctions _logger = logger; _processChatBox = Marshal.GetDelegateForFunctionPointer(sigScanner.ScanText(Signatures.SendChat)); - _sanitiseString = - (delegate* unmanaged)sigScanner.ScanText(Signatures.SanitiseString); _emoteCommands = dataManager.GetExcelSheet() .Where(x => x.RowId > 0) @@ -122,7 +119,7 @@ internal sealed unsafe class ChatFunctions { var uText = Utf8String.FromString(text); - _sanitiseString(uText, 0x27F, IntPtr.Zero); + uText->SanitizeString((AllowedEntities)0x27F); var sanitised = uText->ToString(); uText->Dtor(); @@ -157,7 +154,6 @@ internal sealed unsafe class ChatFunctions private static class Signatures { internal const string SendChat = "48 89 5C 24 ?? 48 89 74 24 ?? 57 48 83 EC 20 48 8B F2 48 8B F9 45 84 C9"; - internal const string SanitiseString = "E8 ?? ?? ?? ?? EB 0A 48 8D 4C 24 ?? E8 ?? ?? ?? ?? 48 8D AE"; } [StructLayout(LayoutKind.Explicit)] diff --git a/Questionable/Questionable.csproj b/Questionable/Questionable.csproj index b46a5111..2d0c16e7 100644 --- a/Questionable/Questionable.csproj +++ b/Questionable/Questionable.csproj @@ -1,4 +1,4 @@ - + dist $(SolutionDir)=X:\ diff --git a/Questionable/QuestionablePlugin.cs b/Questionable/QuestionablePlugin.cs index 24294cd9..3b96efd1 100644 --- a/Questionable/QuestionablePlugin.cs +++ b/Questionable/QuestionablePlugin.cs @@ -55,7 +55,8 @@ public sealed class QuestionablePlugin : IDalamudPlugin IKeyState keyState, IContextMenu contextMenu, IToastGui toastGui, - IGameInteropProvider gameInteropProvider) + IGameInteropProvider gameInteropProvider, + IAetheryteList aetheryteList) { ArgumentNullException.ThrowIfNull(pluginInterface); ArgumentNullException.ThrowIfNull(chatGui); @@ -84,6 +85,7 @@ public sealed class QuestionablePlugin : IDalamudPlugin serviceCollection.AddSingleton(contextMenu); serviceCollection.AddSingleton(toastGui); serviceCollection.AddSingleton(gameInteropProvider); + serviceCollection.AddSingleton(aetheryteList); serviceCollection.AddSingleton(new WindowSystem(nameof(Questionable))); serviceCollection.AddSingleton((Configuration?)pluginInterface.GetPluginConfig() ?? new Configuration()); diff --git a/Questionable/Windows/ConfigComponents/ConfigComponent.cs b/Questionable/Windows/ConfigComponents/ConfigComponent.cs index a44ef934..2ca3446d 100644 --- a/Questionable/Windows/ConfigComponents/ConfigComponent.cs +++ b/Questionable/Windows/ConfigComponents/ConfigComponent.cs @@ -1,11 +1,10 @@ using System.Collections.Generic; -using System.Text; +using Dalamud.Bindings.ImGui; using Dalamud.Game.Text; using Dalamud.Interface; using Dalamud.Interface.Colors; using Dalamud.Interface.Utility.Raii; using Dalamud.Plugin; -using ImGuiNET; namespace Questionable.Windows.ConfigComponents; @@ -51,21 +50,6 @@ internal abstract class ConfigComponent return $"{(includePrefix ? SeIconChar.LevelEn.ToIconString() : string.Empty)}{FormatLevel(level / 10, false)}{(SeIconChar.Number0 + level % 10).ToIconChar()}"; } - /// - /// The default implementation for throws an NullReferenceException if the clipboard is empty, maybe also if it doesn't contain text. - /// - protected unsafe string? GetClipboardText() - { - byte* ptr = ImGuiNative.igGetClipboardText(); - if (ptr == null) - return null; - - int byteCount = 0; - while (ptr[byteCount] != 0) - ++byteCount; - return Encoding.UTF8.GetString(ptr, byteCount); - } - protected static void DrawNotes(bool enabledByDefault, IEnumerable notes) { using var color = new ImRaii.Color(); diff --git a/Questionable/Windows/ConfigComponents/DebugConfigComponent.cs b/Questionable/Windows/ConfigComponents/DebugConfigComponent.cs index e86fbafd..ab0aa025 100644 --- a/Questionable/Windows/ConfigComponents/DebugConfigComponent.cs +++ b/Questionable/Windows/ConfigComponents/DebugConfigComponent.cs @@ -1,8 +1,8 @@ +using Dalamud.Bindings.ImGui; using Dalamud.Interface.Colors; using Dalamud.Interface.Components; using Dalamud.Interface.Utility.Raii; using Dalamud.Plugin; -using ImGuiNET; namespace Questionable.Windows.ConfigComponents; diff --git a/Questionable/Windows/ConfigComponents/DutyConfigComponent.cs b/Questionable/Windows/ConfigComponents/DutyConfigComponent.cs index 31e077f5..50fd326a 100644 --- a/Questionable/Windows/ConfigComponents/DutyConfigComponent.cs +++ b/Questionable/Windows/ConfigComponents/DutyConfigComponent.cs @@ -4,6 +4,7 @@ using System.Globalization; using System.Linq; using System.Numerics; using System.Text; +using Dalamud.Bindings.ImGui; using Dalamud.Interface; using Dalamud.Interface.Colors; using Dalamud.Interface.Components; @@ -11,7 +12,6 @@ using Dalamud.Interface.Utility.Raii; using Dalamud.Plugin; using Dalamud.Plugin.Services; using Dalamud.Utility; -using ImGuiNET; using Lumina.Excel.Sheets; using Questionable.Controller; using Questionable.Data; @@ -206,13 +206,13 @@ internal sealed class DutyConfigComponent : ConfigComponent ImGui.SameLine(); - string? clipboardText = GetClipboardText(); - using (ImRaii.Disabled(clipboardText == null || + string clipboardText = ImGui.GetClipboardText(); + using (ImRaii.Disabled(string.IsNullOrEmpty(clipboardText) || !clipboardText.StartsWith(DutyClipboardPrefix, StringComparison.InvariantCulture))) { if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Paste, "Import from Clipboard")) { - clipboardText = clipboardText!.Substring(DutyClipboardPrefix.Length); + clipboardText = clipboardText.Substring(DutyClipboardPrefix.Length); string text = Encoding.UTF8.GetString(Convert.FromBase64String(clipboardText)); Configuration.Duties.WhitelistedDutyCfcIds.Clear(); diff --git a/Questionable/Windows/ConfigComponents/GeneralConfigComponent.cs b/Questionable/Windows/ConfigComponents/GeneralConfigComponent.cs index 7686c54c..e3a0c3f5 100644 --- a/Questionable/Windows/ConfigComponents/GeneralConfigComponent.cs +++ b/Questionable/Windows/ConfigComponents/GeneralConfigComponent.cs @@ -1,11 +1,11 @@ using System; using System.Collections.Generic; using System.Linq; +using Dalamud.Bindings.ImGui; using Dalamud.Interface; using Dalamud.Interface.Utility.Raii; using Dalamud.Plugin; using Dalamud.Plugin.Services; -using ImGuiNET; using LLib.GameData; using Lumina.Excel.Sheets; using Questionable.Controller; diff --git a/Questionable/Windows/ConfigComponents/NotificationConfigComponent.cs b/Questionable/Windows/ConfigComponents/NotificationConfigComponent.cs index 5df122a5..6f5f25e6 100644 --- a/Questionable/Windows/ConfigComponents/NotificationConfigComponent.cs +++ b/Questionable/Windows/ConfigComponents/NotificationConfigComponent.cs @@ -1,11 +1,11 @@ using System; using System.Linq; +using Dalamud.Bindings.ImGui; using Dalamud.Game.Text; using Dalamud.Interface.Components; using Dalamud.Interface.Utility.Raii; using Dalamud.Plugin; using Dalamud.Utility; -using ImGuiNET; using Questionable.External; namespace Questionable.Windows.ConfigComponents; diff --git a/Questionable/Windows/ConfigComponents/PluginConfigComponent.cs b/Questionable/Windows/ConfigComponents/PluginConfigComponent.cs index b016b08f..15833156 100644 --- a/Questionable/Windows/ConfigComponents/PluginConfigComponent.cs +++ b/Questionable/Windows/ConfigComponents/PluginConfigComponent.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; +using Dalamud.Bindings.ImGui; using Dalamud.Interface; using Dalamud.Interface.Colors; using Dalamud.Interface.Components; @@ -9,7 +10,6 @@ using Dalamud.Interface.Utility.Raii; using Dalamud.Plugin; using Dalamud.Plugin.Services; using Dalamud.Utility; -using ImGuiNET; using Questionable.Controller; using Questionable.External; diff --git a/Questionable/Windows/ConfigComponents/SinglePlayerDutyConfigComponent.cs b/Questionable/Windows/ConfigComponents/SinglePlayerDutyConfigComponent.cs index 369e2545..cd641366 100644 --- a/Questionable/Windows/ConfigComponents/SinglePlayerDutyConfigComponent.cs +++ b/Questionable/Windows/ConfigComponents/SinglePlayerDutyConfigComponent.cs @@ -4,13 +4,13 @@ using System.Collections.Immutable; using System.Collections.ObjectModel; using System.Linq; using System.Numerics; +using Dalamud.Bindings.ImGui; using Dalamud.Interface; using Dalamud.Interface.Colors; using Dalamud.Interface.Components; using Dalamud.Interface.Utility.Raii; using Dalamud.Plugin; using Dalamud.Plugin.Services; -using ImGuiNET; using LLib.GameData; using Lumina.Excel.Sheets; using Microsoft.Extensions.Logging; diff --git a/Questionable/Windows/ConfigWindow.cs b/Questionable/Windows/ConfigWindow.cs index 0f32f74a..994eae28 100644 --- a/Questionable/Windows/ConfigWindow.cs +++ b/Questionable/Windows/ConfigWindow.cs @@ -1,6 +1,6 @@ -using Dalamud.Interface.Utility.Raii; +using Dalamud.Bindings.ImGui; +using Dalamud.Interface.Utility.Raii; using Dalamud.Plugin; -using ImGuiNET; using LLib.ImGui; using Questionable.Windows.ConfigComponents; diff --git a/Questionable/Windows/DebugOverlay.cs b/Questionable/Windows/DebugOverlay.cs index 9916dc05..a40a4f34 100644 --- a/Questionable/Windows/DebugOverlay.cs +++ b/Questionable/Windows/DebugOverlay.cs @@ -2,11 +2,11 @@ using System.Globalization; using System.Linq; using System.Numerics; +using Dalamud.Bindings.ImGui; using Dalamud.Game.ClientState.Conditions; using Dalamud.Game.ClientState.Objects.Types; using Dalamud.Interface.Windowing; using Dalamud.Plugin.Services; -using ImGuiNET; using Questionable.Controller; using Questionable.Data; using Questionable.Model.Questing; diff --git a/Questionable/Windows/JournalComponents/AlliedSocietyJournalComponent.cs b/Questionable/Windows/JournalComponents/AlliedSocietyJournalComponent.cs index 99582c24..e627fd3c 100644 --- a/Questionable/Windows/JournalComponents/AlliedSocietyJournalComponent.cs +++ b/Questionable/Windows/JournalComponents/AlliedSocietyJournalComponent.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using System.Linq; +using Dalamud.Bindings.ImGui; using Dalamud.Interface.Colors; using Dalamud.Interface.Utility.Raii; -using ImGuiNET; using Questionable.Controller; using Questionable.Data; using Questionable.Functions; diff --git a/Questionable/Windows/JournalComponents/GatheringJournalComponent.cs b/Questionable/Windows/JournalComponents/GatheringJournalComponent.cs index 1104d9e8..0f47e471 100644 --- a/Questionable/Windows/JournalComponents/GatheringJournalComponent.cs +++ b/Questionable/Windows/JournalComponents/GatheringJournalComponent.cs @@ -2,13 +2,13 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; +using Dalamud.Bindings.ImGui; using Dalamud.Interface; using Dalamud.Interface.Colors; using Dalamud.Interface.Utility.Raii; using Dalamud.Plugin; using Dalamud.Plugin.Services; using Dalamud.Utility.Signatures; -using ImGuiNET; using LLib.GameData; using Lumina.Excel.Sheets; using Questionable.Controller; diff --git a/Questionable/Windows/JournalComponents/QuestJournalComponent.cs b/Questionable/Windows/JournalComponents/QuestJournalComponent.cs index de5d3e2d..7d1f256e 100644 --- a/Questionable/Windows/JournalComponents/QuestJournalComponent.cs +++ b/Questionable/Windows/JournalComponents/QuestJournalComponent.cs @@ -2,7 +2,6 @@ using Dalamud.Interface.Colors; using Dalamud.Interface.Utility.Raii; using Dalamud.Plugin; -using ImGuiNET; using Questionable.Controller; using Questionable.Data; using Questionable.Functions; @@ -13,6 +12,7 @@ using System; using System.Collections.Generic; using System.Globalization; using System.Linq; +using Dalamud.Bindings.ImGui; namespace Questionable.Windows.JournalComponents; diff --git a/Questionable/Windows/JournalComponents/QuestJournalUtils.cs b/Questionable/Windows/JournalComponents/QuestJournalUtils.cs index 613a9442..37c51862 100644 --- a/Questionable/Windows/JournalComponents/QuestJournalUtils.cs +++ b/Questionable/Windows/JournalComponents/QuestJournalUtils.cs @@ -1,7 +1,7 @@ -using Dalamud.Interface.Components; +using Dalamud.Bindings.ImGui; +using Dalamud.Interface.Components; using Dalamud.Interface.Utility.Raii; using Dalamud.Plugin.Services; -using ImGuiNET; using Questionable.Controller; using Questionable.Functions; using Questionable.Model; diff --git a/Questionable/Windows/JournalComponents/QuestRewardComponent.cs b/Questionable/Windows/JournalComponents/QuestRewardComponent.cs index 9efa5029..0f925e68 100644 --- a/Questionable/Windows/JournalComponents/QuestRewardComponent.cs +++ b/Questionable/Windows/JournalComponents/QuestRewardComponent.cs @@ -1,10 +1,10 @@ using System; using System.Linq; +using Dalamud.Bindings.ImGui; using Dalamud.Game.Text; using Dalamud.Interface; using Dalamud.Interface.Colors; using Dalamud.Interface.Utility.Raii; -using ImGuiNET; using Questionable.Controller; using Questionable.Data; using Questionable.Model; diff --git a/Questionable/Windows/OneTimeSetupWindow.cs b/Questionable/Windows/OneTimeSetupWindow.cs index bab81461..8521ad52 100644 --- a/Questionable/Windows/OneTimeSetupWindow.cs +++ b/Questionable/Windows/OneTimeSetupWindow.cs @@ -1,9 +1,9 @@ -using Dalamud.Interface; +using Dalamud.Bindings.ImGui; +using Dalamud.Interface; using Dalamud.Interface.Colors; using Dalamud.Interface.Components; using Dalamud.Interface.Utility.Raii; using Dalamud.Plugin; -using ImGuiNET; using LLib.ImGui; using Microsoft.Extensions.Logging; using Questionable.Windows.ConfigComponents; diff --git a/Questionable/Windows/PriorityWindow.cs b/Questionable/Windows/PriorityWindow.cs index 487339c9..cd933d79 100644 --- a/Questionable/Windows/PriorityWindow.cs +++ b/Questionable/Windows/PriorityWindow.cs @@ -3,12 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Numerics; using System.Text; +using Dalamud.Bindings.ImGui; using Dalamud.Interface; using Dalamud.Interface.Colors; using Dalamud.Interface.Components; using Dalamud.Plugin; using Dalamud.Plugin.Services; -using ImGuiNET; using LLib.ImGui; using Questionable.Controller; using Questionable.Functions; @@ -255,18 +255,18 @@ internal sealed class PriorityWindow : LWindow } } - private List ParseClipboardItems() + private static List ParseClipboardItems() { - string? clipboardText = GetClipboardText(); + string clipboardText = ImGui.GetClipboardText(); return DecodeQuestPriority(clipboardText); } - public static List DecodeQuestPriority(string? clipboardText) + public static List DecodeQuestPriority(string clipboardText) { List clipboardItems = new List(); try { - if (clipboardText != null && clipboardText.StartsWith(ClipboardPrefix, StringComparison.InvariantCulture)) + if (string.IsNullOrEmpty(clipboardText) && clipboardText.StartsWith(ClipboardPrefix, StringComparison.InvariantCulture)) { clipboardText = clipboardText.Substring(ClipboardPrefix.Length); string text = Encoding.UTF8.GetString(Convert.FromBase64String(clipboardText)); @@ -302,19 +302,4 @@ internal sealed class PriorityWindow : LWindow { _questController.ImportQuestPriority(questElements); } - - /// - /// The default implementation for throws an NullReferenceException if the clipboard is empty, maybe also if it doesn't contain text. - /// - private unsafe string? GetClipboardText() - { - byte* ptr = ImGuiNative.igGetClipboardText(); - if (ptr == null) - return null; - - int byteCount = 0; - while (ptr[byteCount] != 0) - ++byteCount; - return Encoding.UTF8.GetString(ptr, byteCount); - } } diff --git a/Questionable/Windows/QuestComponents/ActiveQuestComponent.cs b/Questionable/Windows/QuestComponents/ActiveQuestComponent.cs index e88177ef..af91165a 100644 --- a/Questionable/Windows/QuestComponents/ActiveQuestComponent.cs +++ b/Questionable/Windows/QuestComponents/ActiveQuestComponent.cs @@ -3,13 +3,13 @@ using System.Collections.Generic; using System.Linq; using System.Numerics; using System.Text.RegularExpressions; +using Dalamud.Bindings.ImGui; using Dalamud.Game.Text; using Dalamud.Interface; using Dalamud.Interface.Colors; using Dalamud.Interface.Components; using Dalamud.Interface.Utility.Raii; using Dalamud.Plugin.Services; -using ImGuiNET; using Questionable.Controller; using Questionable.Controller.Steps.Shared; using Questionable.Functions; diff --git a/Questionable/Windows/QuestComponents/CreationUtilsComponent.cs b/Questionable/Windows/QuestComponents/CreationUtilsComponent.cs index 74174812..266cd424 100644 --- a/Questionable/Windows/QuestComponents/CreationUtilsComponent.cs +++ b/Questionable/Windows/QuestComponents/CreationUtilsComponent.cs @@ -2,6 +2,7 @@ using System.Diagnostics; using System.Globalization; using System.Numerics; +using Dalamud.Bindings.ImGui; using Dalamud.Game.ClientState.Conditions; using Dalamud.Game.ClientState.Objects; using Dalamud.Game.ClientState.Objects.Types; @@ -12,7 +13,6 @@ using Dalamud.Interface.Components; using Dalamud.Plugin.Services; using FFXIVClientStructs.FFXIV.Client.Game.Control; using FFXIVClientStructs.FFXIV.Client.Game.Object; -using ImGuiNET; using Microsoft.Extensions.Logging; using Questionable.Controller; using Questionable.Data; diff --git a/Questionable/Windows/QuestComponents/EventInfoComponent.cs b/Questionable/Windows/QuestComponents/EventInfoComponent.cs index 79733057..b27bcbe3 100644 --- a/Questionable/Windows/QuestComponents/EventInfoComponent.cs +++ b/Questionable/Windows/QuestComponents/EventInfoComponent.cs @@ -3,13 +3,13 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; +using Dalamud.Bindings.ImGui; using Dalamud.Interface; using Dalamud.Interface.Components; using Dalamud.Interface.Utility.Raii; using Dalamud.Plugin; using Humanizer; using Humanizer.Localisation; -using ImGuiNET; using Questionable.Controller; using Questionable.Data; using Questionable.Functions; diff --git a/Questionable/Windows/QuestComponents/QuestTooltipComponent.cs b/Questionable/Windows/QuestComponents/QuestTooltipComponent.cs index e74beb2a..b15e6c8e 100644 --- a/Questionable/Windows/QuestComponents/QuestTooltipComponent.cs +++ b/Questionable/Windows/QuestComponents/QuestTooltipComponent.cs @@ -1,9 +1,9 @@ -using Dalamud.Game.Text; +using Dalamud.Bindings.ImGui; +using Dalamud.Game.Text; using Dalamud.Interface; using Dalamud.Interface.Colors; using Dalamud.Interface.Utility.Raii; using FFXIVClientStructs.FFXIV.Client.UI.Agent; -using ImGuiNET; using Questionable.Controller; using Questionable.Data; using Questionable.Functions; diff --git a/Questionable/Windows/QuestComponents/QuickAccessButtonsComponent.cs b/Questionable/Windows/QuestComponents/QuickAccessButtonsComponent.cs index 8d610825..949647fe 100644 --- a/Questionable/Windows/QuestComponents/QuickAccessButtonsComponent.cs +++ b/Questionable/Windows/QuestComponents/QuickAccessButtonsComponent.cs @@ -1,7 +1,7 @@ using System; using System.Globalization; using System.Numerics; -using Dalamud.Game.ClientState.Conditions; +using Dalamud.Bindings.ImGui; using Dalamud.Interface; using Dalamud.Interface.Colors; using Dalamud.Interface.Components; @@ -9,74 +9,38 @@ using Dalamud.Interface.Utility; using Dalamud.Interface.Utility.Raii; using Dalamud.Plugin; using Dalamud.Plugin.Services; -using FFXIVClientStructs.FFXIV.Client.UI.Agent; -using ImGuiNET; using Questionable.Controller; -using Questionable.External; -using Questionable.Functions; namespace Questionable.Windows.QuestComponents; internal sealed class QuickAccessButtonsComponent { - private readonly MovementController _movementController; - private readonly GameFunctions _gameFunctions; - private readonly ChatFunctions _chatFunctions; private readonly QuestRegistry _questRegistry; - private readonly NavmeshIpc _navmeshIpc; private readonly QuestValidationWindow _questValidationWindow; private readonly JournalProgressWindow _journalProgressWindow; - private readonly IClientState _clientState; - private readonly ICondition _condition; private readonly ICommandManager _commandManager; private readonly IDalamudPluginInterface _pluginInterface; public QuickAccessButtonsComponent( - MovementController movementController, - GameFunctions gameFunctions, - ChatFunctions chatFunctions, QuestRegistry questRegistry, - NavmeshIpc navmeshIpc, QuestValidationWindow questValidationWindow, JournalProgressWindow journalProgressWindow, - IClientState clientState, - ICondition condition, ICommandManager commandManager, IDalamudPluginInterface pluginInterface) { - _movementController = movementController; - _gameFunctions = gameFunctions; - _chatFunctions = chatFunctions; _questRegistry = questRegistry; - _navmeshIpc = navmeshIpc; _questValidationWindow = questValidationWindow; _journalProgressWindow = journalProgressWindow; - _clientState = clientState; - _condition = condition; _commandManager = commandManager; _pluginInterface = pluginInterface; } public event EventHandler? Reload; - public unsafe void Draw() + public void Draw() { - var map = AgentMap.Instance(); - using (var unused = ImRaii.Disabled(map == null || !map->IsFlagMarkerSet || - map->FlagMapMarker.TerritoryId != _clientState.TerritoryType || - !_navmeshIpc.IsReady)) - { - if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Flag, "To Flag")) - { - _movementController.Destination = null; - _chatFunctions.ExecuteCommand( - $"/vnav {(_condition[ConditionFlag.Mounted] && _gameFunctions.IsFlyingUnlockedInCurrentZone() ? "flyflag" : "moveflag")}"); - } - } - if (_commandManager.Commands.ContainsKey("/vnav")) { - ImGui.SameLine(); using (var unused = ImRaii.Disabled(!ImGui.IsKeyDown(ImGuiKey.ModCtrl))) { if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.GlobeEurope, "Rebuild Navmesh")) diff --git a/Questionable/Windows/QuestComponents/RemainingTasksComponent.cs b/Questionable/Windows/QuestComponents/RemainingTasksComponent.cs index 84d44c90..5f21b767 100644 --- a/Questionable/Windows/QuestComponents/RemainingTasksComponent.cs +++ b/Questionable/Windows/QuestComponents/RemainingTasksComponent.cs @@ -1,5 +1,5 @@ using System.Collections.Generic; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Questionable.Controller; namespace Questionable.Windows.QuestComponents; diff --git a/Questionable/Windows/QuestSelectionWindow.cs b/Questionable/Windows/QuestSelectionWindow.cs index 59aceb9a..53252ac2 100644 --- a/Questionable/Windows/QuestSelectionWindow.cs +++ b/Questionable/Windows/QuestSelectionWindow.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; using System.Numerics; +using Dalamud.Bindings.ImGui; using Dalamud.Game.ClientState.Objects.Types; using Dalamud.Interface; using Dalamud.Interface.Colors; @@ -10,7 +11,6 @@ using Dalamud.Plugin; using Dalamud.Plugin.Services; using FFXIVClientStructs.FFXIV.Client.Game.UI; using FFXIVClientStructs.FFXIV.Client.UI; -using ImGuiNET; using LLib.GameUI; using LLib.ImGui; using Questionable.Controller; diff --git a/Questionable/Windows/QuestValidationWindow.cs b/Questionable/Windows/QuestValidationWindow.cs index c92fb45e..83288a20 100644 --- a/Questionable/Windows/QuestValidationWindow.cs +++ b/Questionable/Windows/QuestValidationWindow.cs @@ -1,10 +1,10 @@ using System.Globalization; +using Dalamud.Bindings.ImGui; using Dalamud.Interface; using Dalamud.Interface.Colors; using Dalamud.Interface.Utility.Raii; using Dalamud.Plugin; using FFXIVClientStructs.FFXIV.Common.Math; -using ImGuiNET; using LLib.ImGui; using Questionable.Data; using Questionable.Validation; diff --git a/Questionable/Windows/QuestWindow.cs b/Questionable/Windows/QuestWindow.cs index 94385247..3ec5d3e9 100644 --- a/Questionable/Windows/QuestWindow.cs +++ b/Questionable/Windows/QuestWindow.cs @@ -1,10 +1,10 @@ using System; using System.Numerics; +using Dalamud.Bindings.ImGui; using Dalamud.Interface; using Dalamud.Interface.Colors; using Dalamud.Plugin; using Dalamud.Plugin.Services; -using ImGuiNET; using LLib.ImGui; using Questionable.Controller; using Questionable.Controller.GameUi; diff --git a/Questionable/Windows/UiUtils.cs b/Questionable/Windows/UiUtils.cs index 6b6bae2a..5cf1ba21 100644 --- a/Questionable/Windows/UiUtils.cs +++ b/Questionable/Windows/UiUtils.cs @@ -1,9 +1,9 @@ using System.Numerics; +using Dalamud.Bindings.ImGui; using Dalamud.Interface; using Dalamud.Interface.Colors; using Dalamud.Plugin; using FFXIVClientStructs.FFXIV.Client.Game.UI; -using ImGuiNET; using Questionable.Functions; using Questionable.Model.Questing; diff --git a/Questionable/packages.lock.json b/Questionable/packages.lock.json index e7d9fe69..a28390f7 100644 --- a/Questionable/packages.lock.json +++ b/Questionable/packages.lock.json @@ -13,9 +13,9 @@ }, "DalamudPackager": { "type": "Direct", - "requested": "[12.0.0, )", - "resolved": "12.0.0", - "contentHash": "J5TJLV3f16T/E2H2P17ClWjtfEBPpq3yxvqW46eN36JCm6wR+EaoaYkqG9Rm5sHqs3/nK/vKjWWyvEs/jhKoXw==" + "requested": "[13.0.0, )", + "resolved": "13.0.0", + "contentHash": "Mb3cUDSK/vDPQ8gQIeuCw03EMYrej1B4J44a1AvIJ9C759p9XeqdU9Hg4WgOmlnlPe0G7ILTD32PKSUpkQNa8w==" }, "DotNet.ReproducibleBuilds": { "type": "Direct", @@ -132,13 +132,13 @@ "gatheringpaths": { "type": "Project", "dependencies": { - "Questionable.Model": "[5.11.0, )" + "Questionable.Model": "[6.0.0, )" } }, "llib": { "type": "Project", "dependencies": { - "DalamudPackager": "[12.0.0, )", + "DalamudPackager": "[13.0.0, )", "JetBrains.Annotations": "[2024.3.0, )" } }, @@ -154,7 +154,7 @@ "questpaths": { "type": "Project", "dependencies": { - "Questionable.Model": "[5.11.0, )" + "Questionable.Model": "[6.0.0, )" } } } diff --git a/vendor/pictomancy b/vendor/pictomancy deleted file mode 160000 index 3b42dc92..00000000 --- a/vendor/pictomancy +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3b42dc922375d65b4340b88d7c53c6b587b93e06