diff --git a/ChatTwo/ChatTwo.csproj b/ChatTwo/ChatTwo.csproj index 9a6779a..2b12995 100755 --- a/ChatTwo/ChatTwo.csproj +++ b/ChatTwo/ChatTwo.csproj @@ -1,6 +1,6 @@ - 1.29.6 + 1.29.7 net8.0-windows enable enable diff --git a/ChatTwo/GameFunctions/Party.cs b/ChatTwo/GameFunctions/Party.cs index 17556d6..f92945a 100755 --- a/ChatTwo/GameFunctions/Party.cs +++ b/ChatTwo/GameFunctions/Party.cs @@ -39,7 +39,7 @@ internal static unsafe class Party return; } - InfoProxyPartyInvite.Instance()->InviteToPartyInInstance(contentId); + InfoProxyPartyInvite.Instance()->InviteToPartyInInstanceByContentId(contentId); } internal static void Kick(string name, ulong contentId) diff --git a/ChatTwo/PayloadHandler.cs b/ChatTwo/PayloadHandler.cs index a481300..141ff9d 100755 --- a/ChatTwo/PayloadHandler.cs +++ b/ChatTwo/PayloadHandler.cs @@ -20,6 +20,7 @@ using FFXIVClientStructs.FFXIV.Client.UI; using FFXIVClientStructs.FFXIV.Component.GUI; using ImGuiNET; using Lumina.Excel.Sheets; + using Action = System.Action; using DalamudPartyFinderPayload = Dalamud.Game.Text.SeStringHandling.Payloads.PartyFinderPayload; using ChatTwoPartyFinderPayload = ChatTwo.Util.PartyFinderPayload; @@ -200,7 +201,7 @@ public sealed class PayloadHandler { internal void Click(Chunk chunk, Payload? payload, ImGuiMouseButton button) { if (Plugin.Config.PlaySounds) - UIModule.PlaySound(PopupSfx); + UIGlobals.PlaySoundEffect(PopupSfx); switch (button) { diff --git a/ChatTwo/Ui/ChatLogWindow.cs b/ChatTwo/Ui/ChatLogWindow.cs index 67fb1b2..e0472e2 100644 --- a/ChatTwo/Ui/ChatLogWindow.cs +++ b/ChatTwo/Ui/ChatLogWindow.cs @@ -19,7 +19,6 @@ using Dalamud.Interface.Utility.Raii; using Dalamud.Interface.Windowing; using Dalamud.Memory; using FFXIVClientStructs.FFXIV.Client.UI; -using FFXIVClientStructs.FFXIV.Client.UI.Agent; using ImGuiNET; using Lumina.Excel.Sheets; @@ -133,7 +132,7 @@ public sealed class ChatLogWindow : Window Activate = true; PlayedClosingSound = false; if (Plugin.Config.PlaySounds) - UIModule.PlaySound(ChatOpenSfx); + UIGlobals.PlaySoundEffect(ChatOpenSfx); // Don't set the channel or text content when activating a disabled tab. if (Plugin.CurrentTab.InputDisabled) @@ -182,20 +181,21 @@ public sealed class ChatLogWindow : Window if (info.Channel is InputChannel.Linkshell1 or InputChannel.CrossLinkshell1 && info.Rotate != RotateMode.None) { + var module = UIModule.Instance(); + // If any of these operations fail, do nothing. - targetChannel = null; if (info.Permanent) { // Rotate using the game's code. if (info.Channel == InputChannel.Linkshell1) { GameFunctions.Chat.RotateLinkshellHistory(info.Rotate); - targetChannel = (InputChannel) AgentChatLog.Instance()->CurrentChannel; + targetChannel = info.Channel + (uint)module->LinkshellCycle; } else { GameFunctions.Chat.RotateCrossLinkshellHistory(info.Rotate); - targetChannel = (InputChannel)AgentChatLog.Instance()->CurrentChannel; + targetChannel = info.Channel + (uint)module->CrossWorldLinkshellCycle; } } else @@ -211,9 +211,7 @@ public sealed class ChatLogWindow : Window } if (info.Permanent) - { SetChannel(targetChannel); - } else Plugin.CurrentTab.CurrentChannel.TempChannel = targetChannel.Value; } @@ -658,7 +656,7 @@ public sealed class ChatLogWindow : Window if (Plugin.Config.PlaySounds && !PlayedClosingSound) { PlayedClosingSound = true; - UIModule.PlaySound(ChatCloseSfx); + UIGlobals.PlaySoundEffect(ChatCloseSfx); } if (Plugin.CurrentTab.CurrentChannel.UseTempChannel) @@ -1529,7 +1527,7 @@ public sealed class ChatLogWindow : Window if (Plugin.Config.PlaySounds && PlayedClosingSound) { PlayedClosingSound = false; - UIModule.PlaySound(ChatOpenSfx); + UIGlobals.PlaySoundEffect(ChatOpenSfx); } var ptr = new ImGuiInputTextCallbackDataPtr(data); diff --git a/ChatTwo/Util/GlobalParametersCache.cs b/ChatTwo/Util/GlobalParametersCache.cs index 9c5208f..f2849e6 100644 --- a/ChatTwo/Util/GlobalParametersCache.cs +++ b/ChatTwo/Util/GlobalParametersCache.cs @@ -36,7 +36,7 @@ public static class GlobalParametersCache Cache = new int[gp.MySize]; for (ulong i = 0; i < gp.MySize; i++) { - var p = gp.Get(i); + var p = gp[(long)i]; if (p.Type == TextParameterType.Integer) Cache[(int)i] = p.IntValue; else