This commit is contained in:
Infi
2025-08-06 22:24:45 +02:00
parent b760de1799
commit efddaf30ad
37 changed files with 153 additions and 145 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ internal sealed unsafe class Chat : IDisposable
private readonly delegate* unmanaged<NetworkModule*, ulong, ushort, Utf8String*, Utf8String*, ushort, ushort, byte> SendTellNative = null!;
// Client::UI::AddonChatLog.OnRefresh
[Signature("40 53 56 57 48 81 EC ?? ?? ?? ?? 48 8B 05 ?? ?? ?? ?? 48 33 C4 48 89 84 24 ?? ?? ?? ?? 49 8B F0 8B FA", DetourName = nameof(ChatLogRefreshDetour))]
[Signature("40 53 57 41 57 48 81 EC ?? ?? ?? ?? 48 8B 05 ?? ?? ?? ?? 48 33 C4 48 89 84 24 ?? ?? ?? ?? 4D 8B F8", DetourName = nameof(ChatLogRefreshDetour))]
private Hook<ChatLogRefreshDelegate>? ChatLogRefreshHook { get; init; }
private delegate byte ChatLogRefreshDelegate(nint log, ushort eventId, AtkValue* value);
+6 -5
View File
@@ -5,7 +5,9 @@ using Dalamud.Game.Text.SeStringHandling;
using Dalamud.Game.Text.SeStringHandling.Payloads;
using Dalamud.Hooking;
using Dalamud.Memory;
using Dalamud.Utility;
using Dalamud.Utility.Signatures;
using FFXIVClientStructs.FFXIV.Client.Enums;
using FFXIVClientStructs.FFXIV.Client.Game.UI;
using FFXIVClientStructs.FFXIV.Client.UI;
using FFXIVClientStructs.FFXIV.Client.UI.Agent;
@@ -21,10 +23,9 @@ namespace ChatTwo.GameFunctions;
internal unsafe class GameFunctions : IDisposable
{
#region Hooks
private delegate nint ResolveTextCommandPlaceholderDelegate(nint a1, byte* placeholderText, byte a3, byte a4);
[Signature("E8 ?? ?? ?? ?? 49 8D 4F 18 4C 8B E0", DetourName = nameof(ResolveTextCommandPlaceholderDetour))]
[Signature("E8 ?? ?? ?? ?? 48 85 C0 0F 84 ?? ?? ?? ?? 48 8B D0 49 8D 4F", DetourName = nameof(ResolveTextCommandPlaceholderDetour))]
private Hook<ResolveTextCommandPlaceholderDelegate>? ResolveTextCommandPlaceholderHook { get; init; }
private delegate nint ResolveTextCommandPlaceholderDelegate(nint a1, byte* placeholderText, byte a3, byte a4);
#endregion
private Plugin Plugin { get; }
@@ -109,7 +110,7 @@ internal unsafe class GameFunctions : IDisposable
return addon != null && addon->IsVisible;
}
internal static void OpenItemTooltip(uint id, ItemPayload.ItemKind itemKind)
internal static void OpenItemTooltip(uint id, ItemKind itemKind)
{
var atkStage = AtkStage.Instance();
var agent = AgentItemDetail.Instance();
@@ -119,7 +120,7 @@ internal unsafe class GameFunctions : IDisposable
if (agent == null || addon == null)
return;
agent->ItemKind = itemKind == ItemPayload.ItemKind.EventItem ? ItemDetailKind.ChatEventItem : ItemDetailKind.ChatItem;
agent->DetailKind = itemKind == ItemKind.EventItem ? DetailKind.KeyItem : DetailKind.Item;
agent->TypeOrId = id;
agent->Index = 0;
agent->Flag1 &= 0xEF;
+1 -1
View File
@@ -7,7 +7,7 @@ using Dalamud.Game.Config;
using Dalamud.Plugin.Services;
using FFXIVClientStructs.FFXIV.Client.System.String;
using FFXIVClientStructs.FFXIV.Client.UI;
using ImGuiNET;
using Dalamud.Bindings.ImGui;
using ModifierFlag = ChatTwo.GameFunctions.Types.ModifierFlag;
namespace ChatTwo.GameFunctions;