From 95eaca1ee80759f604af530ea72dd7df16244e04 Mon Sep 17 00:00:00 2001 From: Raymond Date: Fri, 3 Dec 2021 09:42:44 -0500 Subject: [PATCH 1/3] Autoformat --- .../Internal/Windows/PluginInstallerWindow.cs | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Dalamud/Interface/Internal/Windows/PluginInstallerWindow.cs b/Dalamud/Interface/Internal/Windows/PluginInstallerWindow.cs index 6745e6b20..0961e0f86 100644 --- a/Dalamud/Interface/Internal/Windows/PluginInstallerWindow.cs +++ b/Dalamud/Interface/Internal/Windows/PluginInstallerWindow.cs @@ -387,16 +387,16 @@ namespace Dalamud.Interface.Internal.Windows { ImGui.Text(Locs.FeedbackModal_Text(this.feedbackPlugin.Name)); - if (this.feedbackPlugin?.FeedbackMessage != null) - { - ImGui.TextWrapped(this.feedbackPlugin.FeedbackMessage); - } + if (this.feedbackPlugin?.FeedbackMessage != null) + { + ImGui.TextWrapped(this.feedbackPlugin.FeedbackMessage); + } - if (this.pluginListUpdatable.Any( - up => up.InstalledPlugin.Manifest.InternalName == this.feedbackPlugin?.InternalName)) - { - ImGui.TextColored(ImGuiColors.DalamudRed, Locs.FeedbackModal_HasUpdate); - } + if (this.pluginListUpdatable.Any( + up => up.InstalledPlugin.Manifest.InternalName == this.feedbackPlugin?.InternalName)) + { + ImGui.TextColored(ImGuiColors.DalamudRed, Locs.FeedbackModal_HasUpdate); + } ImGui.Spacing(); @@ -1231,10 +1231,10 @@ namespace Dalamud.Interface.Internal.Windows this.DrawVisitRepoUrlButton(manifest.RepoUrl); - if (!manifest.SourceRepo.IsThirdParty && manifest.AcceptsFeedback) - { - this.DrawSendFeedbackButton(manifest); - } + if (!manifest.SourceRepo.IsThirdParty && manifest.AcceptsFeedback) + { + this.DrawSendFeedbackButton(manifest); + } ImGuiHelpers.ScaledDummy(5); @@ -1405,8 +1405,8 @@ namespace Dalamud.Interface.Internal.Windows ImGui.SameLine(); ImGui.TextColored(ImGuiColors.DalamudGrey3, downloadText); - var isThirdParty = manifest.IsThirdParty; - var canFeedback = !isThirdParty && !plugin.IsDev && plugin.Manifest.DalamudApiLevel == PluginManager.DalamudApiLevel && plugin.Manifest.AcceptsFeedback; + var isThirdParty = manifest.IsThirdParty; + var canFeedback = !isThirdParty && !plugin.IsDev && plugin.Manifest.DalamudApiLevel == PluginManager.DalamudApiLevel && plugin.Manifest.AcceptsFeedback; // Installed from if (plugin.IsDev) From 9f6c8cb9cf3f36974bebc0ef38feca36aeea28e0 Mon Sep 17 00:00:00 2001 From: Raymond Date: Fri, 3 Dec 2021 10:01:37 -0500 Subject: [PATCH 2/3] FateTable update for ClientStructs --- Dalamud/Game/ClientState/Fates/Fate.cs | 2 +- Dalamud/Game/ClientState/Fates/FateTable.cs | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Dalamud/Game/ClientState/Fates/Fate.cs b/Dalamud/Game/ClientState/Fates/Fate.cs index 5f9a4cb95..c6327ed64 100644 --- a/Dalamud/Game/ClientState/Fates/Fate.cs +++ b/Dalamud/Game/ClientState/Fates/Fate.cs @@ -131,6 +131,6 @@ namespace Dalamud.Game.ClientState.Fates /// /// Gets the territory this is located in. /// - public ExcelResolver TerritoryType => new(this.Struct->TerritoryID); + public ExcelResolver TerritoryType => new(this.Struct->TerritoryId); } } diff --git a/Dalamud/Game/ClientState/Fates/FateTable.cs b/Dalamud/Game/ClientState/Fates/FateTable.cs index ff0361db9..82e7865ec 100644 --- a/Dalamud/Game/ClientState/Fates/FateTable.cs +++ b/Dalamud/Game/ClientState/Fates/FateTable.cs @@ -45,16 +45,13 @@ namespace Dalamud.Game.ClientState.Fates return 0; // Sonar used this to check if the table was safe to read - var check = Struct->Unk80.ToInt64(); - if (check == 0) + if (Struct->FateDirector == null) return 0; - var start = Struct->FirstFatePtr.ToInt64(); - var end = Struct->LastFatePtr.ToInt64(); - if (start == 0 || end == 0) + if (Struct->Fates.First == null || Struct->Fates.Last == null) return 0; - return (int)((end - start) / 8); + return (int)Struct->Fates.Capacity(); } } @@ -102,8 +99,7 @@ namespace Dalamud.Game.ClientState.Fates if (fateTable == IntPtr.Zero) return IntPtr.Zero; - var firstFate = this.Struct->FirstFatePtr; - return *(IntPtr*)(firstFate + (8 * index)); + return *(IntPtr*)this.Struct->Fates.Get((ulong)index).Value; } /// From 2524dfb4fcbbd2b1bf62dc524785b4d837cdd1f2 Mon Sep 17 00:00:00 2001 From: Raymond Date: Fri, 3 Dec 2021 10:01:47 -0500 Subject: [PATCH 3/3] Dont send CorePlugin directly to devPlugins --- Dalamud.CorePlugin/Dalamud.CorePlugin.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dalamud.CorePlugin/Dalamud.CorePlugin.csproj b/Dalamud.CorePlugin/Dalamud.CorePlugin.csproj index 5f4f5560c..eee532a20 100644 --- a/Dalamud.CorePlugin/Dalamud.CorePlugin.csproj +++ b/Dalamud.CorePlugin/Dalamud.CorePlugin.csproj @@ -16,7 +16,7 @@ - $(AppData)\XIVLauncher\devPlugins\Dalamud.CorePlugin + bin\$(Configuration) true full false