diff --git a/.gitmodules b/.gitmodules index d92146500..208167663 100644 --- a/.gitmodules +++ b/.gitmodules @@ -5,3 +5,6 @@ [submodule "lib/FFXIVClientStructs"] path = lib/FFXIVClientStructs url = https://github.com/aers/FFXIVClientStructs.git +[submodule "ECommons"] + path = ECommons + url = https://github.com/NightmareXIV/ECommons.git diff --git a/ECommons b/ECommons new file mode 160000 index 000000000..1ad0decf6 --- /dev/null +++ b/ECommons @@ -0,0 +1 @@ +Subproject commit 1ad0decf6d6a169dc0d5779b1c40a5ca733a51d0 diff --git a/XIVSlothCombo.sln b/XIVSlothCombo.sln index 0eca0ecc7..99cae0a86 100644 --- a/XIVSlothCombo.sln +++ b/XIVSlothCombo.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.32228.343 +# Visual Studio Version 17 +VisualStudioVersion = 17.8.34112.27 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XIVSlothCombo", "XIVSlothCombo\XIVSlothCombo.csproj", "{619DF476-7225-4783-95A5-D29A8816EE66}" EndProject @@ -17,6 +17,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Github Actions", "Github Ac .github\workflows\build.yml = .github\workflows\build.yml EndProjectSection EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ECommons", "ECommons\ECommons\ECommons.csproj", "{3E8E720E-9990-4202-9035-12F54C78CF47}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 @@ -30,6 +32,12 @@ Global {619DF476-7225-4783-95A5-D29A8816EE66}.GitBuild|x64.Build.0 = GitBuild|x64 {619DF476-7225-4783-95A5-D29A8816EE66}.Release|x64.ActiveCfg = Release|x64 {619DF476-7225-4783-95A5-D29A8816EE66}.Release|x64.Build.0 = Release|x64 + {3E8E720E-9990-4202-9035-12F54C78CF47}.Debug|x64.ActiveCfg = Debug|x64 + {3E8E720E-9990-4202-9035-12F54C78CF47}.Debug|x64.Build.0 = Debug|x64 + {3E8E720E-9990-4202-9035-12F54C78CF47}.GitBuild|x64.ActiveCfg = Debug|x64 + {3E8E720E-9990-4202-9035-12F54C78CF47}.GitBuild|x64.Build.0 = Debug|x64 + {3E8E720E-9990-4202-9035-12F54C78CF47}.Release|x64.ActiveCfg = Release|x64 + {3E8E720E-9990-4202-9035-12F54C78CF47}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/XIVSlothCombo/CustomCombo/Functions/Cooldown.cs b/XIVSlothCombo/CustomCombo/Functions/Cooldown.cs index 896d5c99e..a87140378 100644 --- a/XIVSlothCombo/CustomCombo/Functions/Cooldown.cs +++ b/XIVSlothCombo/CustomCombo/Functions/Cooldown.cs @@ -59,6 +59,6 @@ internal abstract partial class CustomComboFunctions /// Get if an action is enabled. /// Action ID to check /// If the action is currently enabled. - public unsafe static bool IsEnabled(uint actionID) => ActionManager.Instance()->GetActionStatus(ActionType.Spell, actionID) == 0; + public unsafe static bool IsEnabled(uint actionID) => ActionManager.Instance()->GetActionStatus(ActionType.Action, actionID) == 0; } } diff --git a/XIVSlothCombo/Data/CustomComboCache.cs b/XIVSlothCombo/Data/CustomComboCache.cs index 71b7c23a0..204864afd 100644 --- a/XIVSlothCombo/Data/CustomComboCache.cs +++ b/XIVSlothCombo/Data/CustomComboCache.cs @@ -130,7 +130,7 @@ internal static unsafe int GetResourceCost(uint actionID) if (actionManager == null) return 0; - int cost = ActionManager.GetActionCost(ActionType.Spell, actionID, 0, 0, 0, 0); + int cost = ActionManager.GetActionCost(ActionType.Action, actionID, 0, 0, 0, 0); return cost; } diff --git a/XIVSlothCombo/Window/IconTextButton.cs b/XIVSlothCombo/Window/IconTextButton.cs index 6b4de2052..b3ddd3aaa 100644 --- a/XIVSlothCombo/Window/IconTextButton.cs +++ b/XIVSlothCombo/Window/IconTextButton.cs @@ -1,4 +1,5 @@ using Dalamud.Interface; +using Dalamud.Interface.Internal; using ECommons.ImGuiMethods; using ImGuiNET; using ImGuiScene; @@ -16,7 +17,7 @@ private static Vector2 GetIconSize(FontAwesomeIcon icon) return iconSize; } - public static bool IconImageButton(TextureWrap texture, string text, Vector2 size = new(), bool imageOnRight = false, float imageScale = 0) + public static bool IconImageButton(IDalamudTextureWrap texture, string text, Vector2 size = new(), bool imageOnRight = false, float imageScale = 0) { var buttonClicked = false; diff --git a/XIVSlothCombo/Window/Tabs/AboutUs.cs b/XIVSlothCombo/Window/Tabs/AboutUs.cs index 114477b7f..b11d5752d 100644 --- a/XIVSlothCombo/Window/Tabs/AboutUs.cs +++ b/XIVSlothCombo/Window/Tabs/AboutUs.cs @@ -1,5 +1,6 @@ using Dalamud.Interface; using Dalamud.Interface.Colors; +using Dalamud.Interface.Internal; using Dalamud.Interface.Utility; using Dalamud.Plugin; using Dalamud.Utility; @@ -18,7 +19,7 @@ internal class AboutUs : ConfigWindow { public static Version version = null!; - private static Dictionary Images = new(); + private static Dictionary Images = new(); internal static void Draw() { version ??= Assembly.GetExecutingAssembly().GetName().Version!; diff --git a/XIVSlothCombo/XIVSlothCombo.csproj b/XIVSlothCombo/XIVSlothCombo.csproj index f2baa61ff..6875ce0e7 100644 --- a/XIVSlothCombo/XIVSlothCombo.csproj +++ b/XIVSlothCombo/XIVSlothCombo.csproj @@ -67,10 +67,13 @@ - + + + + $(DalamudLibPath)Dalamud.dll