This commit is contained in:
Infi
2024-11-13 04:13:18 +01:00
parent 9597218319
commit 45fdac0dd6
21 changed files with 341 additions and 339 deletions
+5 -5
View File
@@ -29,7 +29,7 @@ internal sealed unsafe class Chat : IDisposable
[Signature("48 89 5C 24 ?? 48 89 74 24 ?? 57 48 83 EC ?? 48 8D B9 ?? ?? ?? ?? 33 C0")]
private readonly delegate* unmanaged<RaptureLogModule*, ushort, Utf8String*, Utf8String*, ulong, ulong, ushort, byte, int, byte, void> PrintTellNative = null!;
[Signature("E8 ?? ?? ?? ?? 48 8D 4C 24 ?? E8 ?? ?? ?? ?? 48 8D 8C 24 ?? ?? ?? ?? E8 ?? ?? ?? ?? B0 01")]
[Signature("E8 ?? ?? ?? ?? 48 8D 4C 24 ?? E8 ?? ?? ?? ?? 48 8D 8C 24 ?? ?? ?? ?? E8 ?? ?? ?? ?? B0 ?? 48 8B 8C 24")]
private readonly delegate* unmanaged<NetworkModule*, ulong, ushort, Utf8String*, Utf8String*, ushort, ushort, byte> SendTellNative = null!;
// Client::UI::AddonChatLog.OnRefresh
@@ -38,7 +38,7 @@ internal sealed unsafe class Chat : IDisposable
private delegate byte ChatLogRefreshDelegate(nint log, ushort eventId, AtkValue* value);
// Replace with CS version later
[Signature("E8 ?? ?? ?? ?? EB 81 48 8B 1D", DetourName = nameof(ContextMenuTellInForayDetour))]
[Signature("48 89 5C 24 ?? 55 56 57 48 81 EC ?? ?? ?? ?? 48 8B 05 ?? ?? ?? ?? 48 33 C4 48 89 84 24 ?? ?? ?? ?? 83 B9", DetourName = nameof(ContextMenuTellInForayDetour))]
private Hook<ContextMenuTellInForayDelegate>? ContextMenuTellInForayHook { get; set; }
private delegate void ContextMenuTellInForayDelegate(RaptureShellModule* module, Utf8String* playerName, Utf8String* worldName, ushort worldId, ulong accountId, ulong contentId, ushort reason);
@@ -123,16 +123,16 @@ internal sealed unsafe class Chat : IDisposable
_ => 0,
};
internal static int RotateLinkshellHistory(RotateMode mode)
internal static void RotateLinkshellHistory(RotateMode mode)
{
var uiModule = UIModule.Instance();
if (mode == RotateMode.None)
uiModule->LinkshellCycle = -1;
return uiModule->RotateLinkshellHistory(GetRotateIdx(mode));
uiModule->RotateLinkshellHistory(GetRotateIdx(mode));
}
internal static int RotateCrossLinkshellHistory(RotateMode mode) =>
internal static void RotateCrossLinkshellHistory(RotateMode mode) =>
UIModule.Instance()->RotateCrossLinkshellHistory(GetRotateIdx(mode));
// This function looks up a channel's user-defined color.
+1 -1
View File
@@ -8,7 +8,7 @@ namespace ChatTwo.GameFunctions;
// From: https://git.anna.lgbt/anna/XivCommon/src/branch/main/XivCommon/Functions/Chat.cs
public unsafe class ChatCommon
{
[Signature("48 89 5C 24 ?? 57 48 83 EC 20 48 8B FA 48 8B D9 45 84 C9")]
[Signature("48 89 5C 24 ?? 48 89 74 24 ?? 57 48 83 EC ?? 48 8B F2 48 8B F9 45 84 C9")]
private readonly delegate* unmanaged<UIModule*, Utf8String*, nint, byte, void> ProcessChatBox = null!;
internal ChatCommon()
+6 -7
View File
@@ -10,7 +10,8 @@ using FFXIVClientStructs.FFXIV.Client.UI;
using FFXIVClientStructs.FFXIV.Client.UI.Agent;
using FFXIVClientStructs.FFXIV.Client.UI.Info;
using FFXIVClientStructs.FFXIV.Component.GUI;
using Lumina.Excel.GeneratedSheets;
using Lumina.Excel;
using Lumina.Excel.Sheets;
using ValueType = FFXIVClientStructs.FFXIV.Component.GUI.ValueType;
namespace ChatTwo.GameFunctions;
@@ -61,11 +62,9 @@ internal unsafe class GameFunctions : IDisposable
private void ListCommand(string name, ushort world, string commandName)
{
var row = Plugin.DataManager.GetExcelSheet<World>()!.GetRow(world);
if (row == null)
return;
var row = Plugin.DataManager.GetExcelSheet<World>().GetRow(world);
var worldName = row.Name.RawString;
var worldName = row.Name.ExtractText();
ReplacementName = $"{name}@{worldName}";
Plugin.Common.SendMessage($"/{commandName} add {Placeholder}");
}
@@ -174,9 +173,9 @@ internal unsafe class GameFunctions : IDisposable
return InfoProxyFriendList.Instance()->CharDataSpan.ToArray();
}
internal static void OpenQuestLog(Quest quest)
internal static void OpenQuestLog(RowRef<Quest> quest)
{
var splits = quest.Id.RawString.Split("_");
var splits = quest.Value.Id.ExtractText().Split("_");
if (splits.Length != 2)
{
Plugin.ChatGui.Print("QuestId is wrongly formatted");