Compare commits
3 Commits
892dcb81ea
...
6e4f397f03
Author | SHA1 | Date |
---|---|---|
Anna | 6e4f397f03 | |
Anna | 231a0acf91 | |
Anna | a373ff5ccd |
|
@ -3,6 +3,7 @@ using System.Runtime.InteropServices;
|
|||
using Dalamud.Game;
|
||||
using Dalamud.Game.Text.SeStringHandling;
|
||||
using Dalamud.Hooking;
|
||||
using Framework = FFXIVClientStructs.FFXIV.Client.System.Framework.Framework;
|
||||
|
||||
namespace XivCommon.Functions {
|
||||
/// <summary>
|
||||
|
@ -10,10 +11,10 @@ namespace XivCommon.Functions {
|
|||
/// </summary>
|
||||
public class BattleTalk : IDisposable {
|
||||
private static class Signatures {
|
||||
internal const string AddBattleTalk = "48 89 5C 24 ?? 57 48 83 EC 50 48 8B 01 49 8B D8 0F 29 74 24 ?? 48 8B FA 0F 28 F3 FF 50 40 C7 44 24 ?? ?? ?? ?? ??";
|
||||
// FIXME
|
||||
internal const string AddBattleTalk = "48 89 5C 24 ?? 57 48 83 EC 50 48 8B 01 49 8B D8 0F 29 74 24 ?? 48 8B FA 0F 28 F3 FF 50 40 C7 44 24 ?? ?? ?? ?? ?? 0F 28 DE 48 8B C8 C7 44 24 ?? ?? ?? ?? ?? 8B 84 24 ?? ?? ?? ?? 4C 8B C3 C6 44 24 ?? ?? 48 8B D7 89 44 24 20 E8 ?? ?? ?? ?? 48 8B 5C 24 ?? 0F 28 74 24 ?? 48 83 C4 50 5F C3 CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC 48 89 5C 24 ?? 57 48 83 EC 50 48 8B 01 49 8B D8 0F 29 74 24 ?? 48 8B FA 0F 28 F3 FF 50 40 C7 44 24";
|
||||
}
|
||||
|
||||
private GameFunctions Functions { get; }
|
||||
private bool HookEnabled { get; }
|
||||
|
||||
/// <summary>
|
||||
|
@ -36,8 +37,7 @@ namespace XivCommon.Functions {
|
|||
private AddBattleTalkDelegate? AddBattleTalk { get; }
|
||||
private Hook<AddBattleTalkDelegate>? AddBattleTalkHook { get; }
|
||||
|
||||
internal BattleTalk(GameFunctions functions, SigScanner scanner,bool hook) {
|
||||
this.Functions = functions;
|
||||
internal BattleTalk(SigScanner scanner,bool hook) {
|
||||
this.HookEnabled = hook;
|
||||
|
||||
if (scanner.TryScanText(Signatures.AddBattleTalk, out var addBattleTalkPtr, "battle talk")) {
|
||||
|
@ -128,7 +128,7 @@ namespace XivCommon.Functions {
|
|||
|
||||
options ??= new BattleTalkOptions();
|
||||
|
||||
var uiModule = (IntPtr) this.Functions.GetFramework()->GetUiModule();
|
||||
var uiModule = (IntPtr) Framework.Instance()->GetUiModule();
|
||||
|
||||
fixed (byte* senderPtr = sender.Terminate(), messagePtr = message.Terminate()) {
|
||||
if (this.HookEnabled) {
|
||||
|
|
|
@ -3,6 +3,7 @@ using System.Diagnostics.CodeAnalysis;
|
|||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using Dalamud.Game;
|
||||
using Framework = FFXIVClientStructs.FFXIV.Client.System.Framework.Framework;
|
||||
|
||||
namespace XivCommon.Functions {
|
||||
/// <summary>
|
||||
|
@ -13,31 +14,35 @@ namespace XivCommon.Functions {
|
|||
internal const string SendChat = "48 89 5C 24 ?? 57 48 83 EC 20 48 8B FA 48 8B D9 45 84 C9";
|
||||
}
|
||||
|
||||
private GameFunctions Functions { get; }
|
||||
|
||||
private delegate void ProcessChatBoxDelegate(IntPtr uiModule, IntPtr message, IntPtr unused, byte a4);
|
||||
|
||||
private ProcessChatBoxDelegate? ProcessChatBox { get; }
|
||||
|
||||
internal Chat(GameFunctions functions, SigScanner scanner) {
|
||||
this.Functions = functions;
|
||||
|
||||
internal Chat(SigScanner scanner) {
|
||||
if (scanner.TryScanText(Signatures.SendChat, out var processChatBoxPtr, "chat sending")) {
|
||||
this.ProcessChatBox = Marshal.GetDelegateForFunctionPointer<ProcessChatBoxDelegate>(processChatBoxPtr);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Send a given message to the chat box. <b>This can send chat to the server.</b>
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <b>This method is unsafe.</b> This method does no checking on your input and
|
||||
/// may send content to the server that the normal client could not. You must
|
||||
/// verify what you're sending and handle content and length to properly use
|
||||
/// this.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name="message">Message to send</param>
|
||||
/// <exception cref="InvalidOperationException">If the signature for this function could not be found</exception>
|
||||
public unsafe void SendMessage(string message) {
|
||||
public unsafe void SendMessageUnsafe(byte[] message) {
|
||||
if (this.ProcessChatBox == null) {
|
||||
throw new InvalidOperationException("Could not find signature for chat sending");
|
||||
}
|
||||
|
||||
var uiModule = (IntPtr) this.Functions.GetFramework()->GetUiModule();
|
||||
var uiModule = (IntPtr) Framework.Instance()->GetUiModule();
|
||||
|
||||
using var payload = new ChatPayload(message);
|
||||
var mem1 = Marshal.AllocHGlobal(400);
|
||||
|
@ -48,6 +53,32 @@ namespace XivCommon.Functions {
|
|||
Marshal.FreeHGlobal(mem1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Send a given message to the chat box. <b>This can send chat to the server.</b>
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// This method is slightly less unsafe than <see cref="SendMessageUnsafe"/>. It
|
||||
/// will throw exceptions for certain inputs that the client can't normally send,
|
||||
/// but it is still possible to make mistakes. Use with caution.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
/// <exception cref="ArgumentException">If <paramref name="message"/> is empty or longer than 500 bytes in UTF-8.</exception>
|
||||
/// <exception cref="InvalidOperationException">If the signature for this function could not be found</exception>
|
||||
public void SendMessage(string message) {
|
||||
var bytes = Encoding.UTF8.GetBytes(message);
|
||||
if (bytes.Length == 0) {
|
||||
throw new ArgumentException("message is empty", nameof(message));
|
||||
}
|
||||
|
||||
if (bytes.Length > 500) {
|
||||
throw new ArgumentException("message is longer than 500 bytes", nameof(message));
|
||||
}
|
||||
|
||||
this.SendMessageUnsafe(bytes);
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Explicit)]
|
||||
[SuppressMessage("ReSharper", "PrivateFieldCanBeConvertedToLocalVariable")]
|
||||
private readonly struct ChatPayload : IDisposable {
|
||||
|
@ -63,8 +94,7 @@ namespace XivCommon.Functions {
|
|||
[FieldOffset(24)]
|
||||
private readonly ulong unk2;
|
||||
|
||||
internal ChatPayload(string text) {
|
||||
var stringBytes = Encoding.UTF8.GetBytes(text);
|
||||
internal ChatPayload(byte[] stringBytes) {
|
||||
this.textPtr = Marshal.AllocHGlobal(stringBytes.Length + 30);
|
||||
Marshal.Copy(stringBytes, 0, this.textPtr, stringBytes.Length);
|
||||
Marshal.WriteByte(this.textPtr + stringBytes.Length, 0);
|
||||
|
|
|
@ -11,6 +11,7 @@ using Dalamud.Hooking;
|
|||
using FFXIVClientStructs.FFXIV.Client.UI.Agent;
|
||||
using FFXIVClientStructs.FFXIV.Component.GUI;
|
||||
using XivCommon.Functions.ContextMenu.Inventory;
|
||||
using Framework = FFXIVClientStructs.FFXIV.Client.System.Framework.Framework;
|
||||
using ValueType = FFXIVClientStructs.FFXIV.Component.GUI.ValueType;
|
||||
|
||||
namespace XivCommon.Functions.ContextMenu {
|
||||
|
@ -20,14 +21,14 @@ namespace XivCommon.Functions.ContextMenu {
|
|||
public class ContextMenu : IDisposable {
|
||||
private static class Signatures {
|
||||
internal const string SomeOpenAddonThing = "E8 ?? ?? ?? ?? 0F B7 C0 48 83 C4 60";
|
||||
internal const string ContextMenuOpen = "48 8B C4 57 41 56 41 57 48 81 EC ?? ?? ?? ??";
|
||||
internal const string ContextMenuSelected = "48 89 5C 24 ?? 55 57 41 56 48 81 EC ?? ?? ?? ?? 48 8B 05 ?? ?? ?? ?? 48 33 C4 48 89 44 24 ?? 80 B9 ?? ?? ?? ?? ??";
|
||||
internal const string ContextMenuEvent66 = "E8 ?? ?? ?? ?? 44 39 A3 ?? ?? ?? ?? 0F 84 ?? ?? ?? ??";
|
||||
internal const string InventoryContextMenuEvent30 = "E8 ?? ?? ?? ?? 48 83 C4 30 5B C3 8B 83 ?? ?? ?? ??";
|
||||
internal const string SetUpContextSubMenu = "E8 ?? ?? ?? ?? 44 39 A3 ?? ?? ?? ?? 0F 86 ?? ?? ?? ??";
|
||||
internal const string ContextMenuOpen = "48 8B C4 57 41 56 41 57 48 81 EC";
|
||||
internal const string ContextMenuSelected = "48 89 5C 24 ?? 55 57 41 56 48 81 EC ?? ?? ?? ?? 48 8B 05 ?? ?? ?? ?? 48 33 C4 48 89 44 24 ?? 80 B9";
|
||||
internal const string ContextMenuEvent66 = "E8 ?? ?? ?? ?? 44 39 A3 ?? ?? ?? ?? 0F 84";
|
||||
internal const string InventoryContextMenuEvent30 = "E8 ?? ?? ?? ?? 48 83 C4 30 5B C3 8B 83";
|
||||
internal const string SetUpContextSubMenu = "E8 ?? ?? ?? ?? 44 39 A3 ?? ?? ?? ?? 0F 86";
|
||||
internal const string SetUpInventoryContextSubMenu = "44 88 44 24 ?? 88 54 24 10 53";
|
||||
internal const string TitleContextMenuOpen = "48 8B C4 57 41 55 41 56 48 81 EC ?? ?? ?? ??";
|
||||
internal const string AtkValueChangeType = "E8 ?? ?? ?? ?? 45 84 F6 48 8D 4C 24 ??";
|
||||
internal const string TitleContextMenuOpen = "48 8B C4 57 41 55 41 56 48 81 EC";
|
||||
internal const string AtkValueChangeType = "E8 ?? ?? ?? ?? 45 84 F6 48 8D 4C 24";
|
||||
internal const string AtkValueSetString = "E8 ?? ?? ?? ?? 41 03 ED";
|
||||
internal const string GetAddonByInternalId = "E8 ?? ?? ?? ?? 8B 6B 20";
|
||||
}
|
||||
|
@ -286,7 +287,7 @@ namespace XivCommon.Functions.ContextMenu {
|
|||
agent ??= this.Agent;
|
||||
|
||||
IntPtr GetAgent(AgentId id) {
|
||||
return (IntPtr) this.Functions.GetFramework()->GetUiModule()->GetAgentModule()->GetAgentByInternalId(id);
|
||||
return (IntPtr) Framework.Instance()->GetUiModule()->GetAgentModule()->GetAgentByInternalId(id);
|
||||
}
|
||||
|
||||
var agentType = AgentType.Unknown;
|
||||
|
|
|
@ -3,6 +3,7 @@ using System.Runtime.InteropServices;
|
|||
using Dalamud.Game;
|
||||
using FFXIVClientStructs.FFXIV.Client.UI.Agent;
|
||||
using Lumina.Excel.GeneratedSheets;
|
||||
using Framework = FFXIVClientStructs.FFXIV.Client.System.Framework.Framework;
|
||||
|
||||
namespace XivCommon.Functions {
|
||||
/// <summary>
|
||||
|
@ -18,13 +19,10 @@ namespace XivCommon.Functions {
|
|||
|
||||
private delegate IntPtr OpenRouletteDelegate(IntPtr agent, byte roulette, byte a3);
|
||||
|
||||
private GameFunctions Functions { get; }
|
||||
private readonly OpenDutyDelegate? _openDuty;
|
||||
private readonly OpenRouletteDelegate? _openRoulette;
|
||||
|
||||
internal DutyFinder(GameFunctions functions, SigScanner scanner) {
|
||||
this.Functions = functions;
|
||||
|
||||
internal DutyFinder(SigScanner scanner) {
|
||||
if (scanner.TryScanText(Signatures.OpenRegularDuty, out var openDutyPtr, "Duty Finder (open duty)")) {
|
||||
this._openDuty = Marshal.GetDelegateForFunctionPointer<OpenDutyDelegate>(openDutyPtr);
|
||||
}
|
||||
|
@ -53,7 +51,7 @@ namespace XivCommon.Functions {
|
|||
throw new InvalidOperationException("Could not find signature for open duty function");
|
||||
}
|
||||
|
||||
var agent = (IntPtr) this.Functions.GetFramework()->GetUiModule()->GetAgentModule()->GetAgentByInternalId(AgentId.ContentsFinder);
|
||||
var agent = (IntPtr) Framework.Instance()->GetUiModule()->GetAgentModule()->GetAgentByInternalId(AgentId.ContentsFinder);
|
||||
|
||||
this._openDuty(agent, contentFinderCondition, 0);
|
||||
}
|
||||
|
@ -75,7 +73,7 @@ namespace XivCommon.Functions {
|
|||
throw new InvalidOperationException("Could not find signature for open roulette function");
|
||||
}
|
||||
|
||||
var agent = (IntPtr) this.Functions.GetFramework()->GetUiModule()->GetAgentModule()->GetAgentByInternalId(AgentId.ContentsFinder);
|
||||
var agent = (IntPtr) Framework.Instance()->GetUiModule()->GetAgentModule()->GetAgentByInternalId(AgentId.ContentsFinder);
|
||||
|
||||
this._openRoulette(agent, roulette, 0);
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
using System.Runtime.InteropServices;
|
||||
using Dalamud.Game;
|
||||
using Dalamud.Game.ClientState.Objects.Types;
|
||||
using Framework = FFXIVClientStructs.FFXIV.Client.System.Framework.Framework;
|
||||
|
||||
namespace XivCommon.Functions {
|
||||
/// <summary>
|
||||
|
@ -12,15 +13,11 @@ namespace XivCommon.Functions {
|
|||
internal const string RequestCharacterInfo = "48 89 5C 24 ?? 57 48 83 EC 40 BA ?? ?? ?? ?? 48 8B D9 E8 ?? ?? ?? ?? 48 8B F8 48 85 C0 74 16";
|
||||
}
|
||||
|
||||
private GameFunctions Functions { get; }
|
||||
|
||||
private delegate long RequestCharInfoDelegate(IntPtr ptr);
|
||||
|
||||
private RequestCharInfoDelegate? RequestCharacterInfo { get; }
|
||||
|
||||
internal Examine(GameFunctions functions, SigScanner scanner) {
|
||||
this.Functions = functions;
|
||||
|
||||
internal Examine(SigScanner scanner) {
|
||||
// got this by checking what accesses rciData below
|
||||
if (scanner.TryScanText(Signatures.RequestCharacterInfo, out var rciPtr, "Examine")) {
|
||||
this.RequestCharacterInfo = Marshal.GetDelegateForFunctionPointer<RequestCharInfoDelegate>(rciPtr);
|
||||
|
@ -46,12 +43,12 @@ namespace XivCommon.Functions {
|
|||
throw new InvalidOperationException("Could not find signature for Examine function");
|
||||
}
|
||||
|
||||
// NOTES LAST UPDATED: 5.55
|
||||
// NOTES LAST UPDATED: 6.0
|
||||
|
||||
// offsets and stuff come from the beginning of case 0x2c (around line 621 in IDA)
|
||||
// if 29f8 ever changes, I'd just scan for it in old binary and find what it is in the new binary at the same spot
|
||||
// 40 55 53 57 41 54 41 55 41 56 48 8D 6C 24 ??
|
||||
var agentModule = (IntPtr) this.Functions.GetFramework()->GetUiModule()->GetAgentModule();
|
||||
var agentModule = (IntPtr) Framework.Instance()->GetUiModule()->GetAgentModule();
|
||||
var rciData = Marshal.ReadIntPtr(agentModule + 0x1A0);
|
||||
|
||||
// offsets at sig E8 ?? ?? ?? ?? 33 C0 EB 4C
|
||||
|
@ -61,7 +58,7 @@ namespace XivCommon.Functions {
|
|||
*(raw + 11) = objectId;
|
||||
*(raw + 12) = objectId;
|
||||
*(raw + 13) = 0xE0000000;
|
||||
*(raw + 311) = 0;
|
||||
*(raw + 301) = 0;
|
||||
|
||||
this.RequestCharacterInfo(rciData);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using FFXIVClientStructs.FFXIV.Client.System.Framework;
|
||||
using FFXIVClientStructs.FFXIV.Client.UI.Agent;
|
||||
|
||||
namespace XivCommon.Functions.FriendList {
|
||||
|
@ -12,8 +13,6 @@ namespace XivCommon.Functions.FriendList {
|
|||
private const int LengthOffset = 0x10;
|
||||
private const int ListOffset = 0x98;
|
||||
|
||||
private GameFunctions Functions { get; }
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// A live list of the currently-logged-in player's friends.
|
||||
|
@ -24,8 +23,7 @@ namespace XivCommon.Functions.FriendList {
|
|||
/// </summary>
|
||||
public unsafe IList<FriendListEntry> List {
|
||||
get {
|
||||
var friendListAgent = (IntPtr) this.Functions
|
||||
.GetFramework()
|
||||
var friendListAgent = (IntPtr) Framework.Instance()
|
||||
->GetUiModule()
|
||||
->GetAgentModule()
|
||||
->GetAgentByInternalId(AgentId.FriendList);
|
||||
|
@ -58,8 +56,7 @@ namespace XivCommon.Functions.FriendList {
|
|||
}
|
||||
}
|
||||
|
||||
internal FriendList(GameFunctions functions) {
|
||||
this.Functions = functions;
|
||||
internal FriendList() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace XivCommon.Functions.Housing {
|
|||
///
|
||||
/// <returns>struct if player is in a housing ward, null otherwise</returns>
|
||||
/// </summary>
|
||||
// Updated: 5.55
|
||||
// Updated: 6.0
|
||||
// 48 89 5C 24 ?? 48 89 6C 24 ?? 48 89 74 24 ?? 57 41 56 41 57 48 83 EC 20 49 8B 00 (ward?)
|
||||
public unsafe RawHousingLocation? RawLocation {
|
||||
get {
|
||||
|
|
|
@ -3,6 +3,7 @@ using System.Runtime.InteropServices;
|
|||
using Dalamud.Game;
|
||||
using FFXIVClientStructs.FFXIV.Client.UI.Agent;
|
||||
using Lumina.Excel.GeneratedSheets;
|
||||
using Framework = FFXIVClientStructs.FFXIV.Client.System.Framework.Framework;
|
||||
|
||||
namespace XivCommon.Functions {
|
||||
/// <summary>
|
||||
|
@ -11,23 +12,17 @@ namespace XivCommon.Functions {
|
|||
public class Journal {
|
||||
private static class Signatures {
|
||||
internal const string OpenQuest = "E8 ?? ?? ?? ?? 48 8B 74 24 ?? 48 8B 7C 24 ?? 48 83 C4 30 5B C3 48 8B CB";
|
||||
internal const string IsQuestCompleted = "E8 ?? ?? ?? ?? 41 88 84 2C ?? ?? ?? ??";
|
||||
internal const string IsQuestCompleted = "E8 ?? ?? ?? ?? 41 88 84 2C";
|
||||
}
|
||||
|
||||
private const int JournalAgentId = 31;
|
||||
|
||||
private delegate IntPtr OpenQuestDelegate(IntPtr agent, int questId, int a3, ushort a4, byte a5);
|
||||
|
||||
private delegate byte IsQuestCompletedDelegate(ushort questId);
|
||||
|
||||
private GameFunctions Functions { get; }
|
||||
|
||||
private readonly OpenQuestDelegate? _openQuest;
|
||||
private readonly IsQuestCompletedDelegate? _isQuestCompleted;
|
||||
|
||||
internal Journal(GameFunctions functions, SigScanner scanner) {
|
||||
this.Functions = functions;
|
||||
|
||||
internal Journal(SigScanner scanner) {
|
||||
if (scanner.TryScanText(Signatures.OpenQuest, out var openQuestPtr, "Journal (open quest)")) {
|
||||
this._openQuest = Marshal.GetDelegateForFunctionPointer<OpenQuestDelegate>(openQuestPtr);
|
||||
}
|
||||
|
@ -56,7 +51,7 @@ namespace XivCommon.Functions {
|
|||
throw new InvalidOperationException("Could not find signature for open quest function");
|
||||
}
|
||||
|
||||
var agent = (IntPtr) this.Functions.GetFramework()->GetUiModule()->GetAgentModule()->GetAgentByInternalId(AgentId.Journal);
|
||||
var agent = (IntPtr) Framework.Instance()->GetUiModule()->GetAgentModule()->GetAgentByInternalId(AgentId.Journal);
|
||||
|
||||
this._openQuest(agent, (int) (questId & 0xFFFF), 1, 0, 1);
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ using Dalamud.Game.Text.SeStringHandling;
|
|||
using Dalamud.Hooking;
|
||||
using FFXIVClientStructs.FFXIV.Client.Graphics;
|
||||
using FFXIVClientStructs.FFXIV.Client.UI;
|
||||
using Framework = FFXIVClientStructs.FFXIV.Client.System.Framework.Framework;
|
||||
|
||||
namespace XivCommon.Functions.NamePlates {
|
||||
/// <summary>
|
||||
|
@ -97,7 +98,7 @@ namespace XivCommon.Functions.NamePlates {
|
|||
return;
|
||||
}
|
||||
|
||||
var atkModule = this.Functions.GetFramework()->GetUiModule()->GetRaptureAtkModule();
|
||||
var atkModule = Framework.Instance()->GetUiModule()->GetRaptureAtkModule();
|
||||
|
||||
var active = numbers->IntArray[0];
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace XivCommon.Functions {
|
|||
/// </summary>
|
||||
public class PartyFinder : IDisposable {
|
||||
private static class Signatures {
|
||||
internal const string RequestListings = "48 89 5C 24 ?? 48 89 74 24 ?? 57 48 83 EC 40 0F 10 81 ?? ?? ?? ??";
|
||||
internal const string RequestListings = "48 89 5C 24 ?? 48 89 74 24 ?? 57 48 83 EC 40 0F 10 81";
|
||||
internal const string JoinCrossParty = "E8 ?? ?? ?? ?? 0F B7 47 28";
|
||||
}
|
||||
|
||||
|
@ -146,8 +146,8 @@ namespace XivCommon.Functions {
|
|||
throw new InvalidOperationException("PartyFinder hooks are not enabled");
|
||||
}
|
||||
|
||||
// Updated 5.5
|
||||
const int categoryOffset = 10_655;
|
||||
// Updated 6.0
|
||||
const int categoryOffset = 11_031;
|
||||
|
||||
if (this.PartyFinderAgent == IntPtr.Zero) {
|
||||
return;
|
||||
|
|
|
@ -10,12 +10,12 @@ namespace XivCommon.Functions.Tooltips {
|
|||
/// </summary>
|
||||
public class Tooltips : IDisposable {
|
||||
private static class Signatures {
|
||||
internal const string AgentItemDetailUpdateTooltip = "E8 ?? ?? ?? ?? 48 8B 5C 24 ?? 48 89 AE ?? ?? ?? ??";
|
||||
internal const string AgentItemDetailUpdateTooltip = "E8 ?? ?? ?? ?? 48 8B 5C 24 ?? 48 89 AE";
|
||||
internal const string AgentActionDetailUpdateTooltip = "E8 ?? ?? ?? ?? EB 68 FF 50 40";
|
||||
internal const string SadSetString = "E8 ?? ?? ?? ?? F6 47 14 08";
|
||||
}
|
||||
|
||||
// Updated: 5.55
|
||||
// Last checked: 6.0
|
||||
// E8 ?? ?? ?? ?? EB 68 FF 50 40
|
||||
private const int AgentActionDetailUpdateFlagOffset = 0x58;
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ using Dalamud.Game;
|
|||
namespace XivCommon.Functions {
|
||||
internal class UiAlloc {
|
||||
private static class Signatures {
|
||||
internal const string GameAlloc = "E8 ?? ?? ?? ?? 45 8D 67 23";
|
||||
internal const string GameAlloc = "E8 ?? ?? ?? ?? 49 83 CF FF 4C 8B F0";
|
||||
internal const string GameFree = "E8 ?? ?? ?? ?? 4C 89 7B 60";
|
||||
internal const string GetGameAllocator = "E8 ?? ?? ?? ?? 8B 75 08";
|
||||
}
|
||||
|
|
|
@ -100,18 +100,18 @@ namespace XivCommon {
|
|||
var scanner = Util.GetService<SigScanner>();
|
||||
|
||||
this.UiAlloc = new UiAlloc(scanner);
|
||||
this.Chat = new Chat(this, scanner);
|
||||
this.Chat = new Chat(scanner);
|
||||
this.PartyFinder = new PartyFinder(scanner, partyFinderGui, hooks);
|
||||
this.BattleTalk = new BattleTalk(this, scanner, hooks.HasFlag(Hooks.BattleTalk));
|
||||
this.Examine = new Examine(this, scanner);
|
||||
this.BattleTalk = new BattleTalk(scanner, hooks.HasFlag(Hooks.BattleTalk));
|
||||
this.Examine = new Examine(scanner);
|
||||
this.Talk = new Talk(scanner, hooks.HasFlag(Hooks.Talk));
|
||||
this.ChatBubbles = new ChatBubbles(objectTable, scanner, hooks.HasFlag(Hooks.ChatBubbles));
|
||||
this.ContextMenu = new ContextMenu(this, scanner, clientState.ClientLanguage, hooks);
|
||||
this.Tooltips = new Tooltips(scanner, this.GameGui, hooks.HasFlag(Hooks.Tooltips));
|
||||
this.NamePlates = new NamePlates(this, scanner, hooks.HasFlag(Hooks.NamePlates));
|
||||
this.DutyFinder = new DutyFinder(this, scanner);
|
||||
this.Journal = new Journal(this, scanner);
|
||||
this.FriendList = new FriendList(this);
|
||||
this.DutyFinder = new DutyFinder(scanner);
|
||||
this.Journal = new Journal(scanner);
|
||||
this.FriendList = new FriendList();
|
||||
this.Housing = new Housing(scanner);
|
||||
}
|
||||
|
||||
|
@ -130,6 +130,7 @@ namespace XivCommon {
|
|||
/// Convenience method to get a pointer to <see cref="Framework"/>.
|
||||
/// </summary>
|
||||
/// <returns>pointer to struct</returns>
|
||||
[Obsolete("Use Framework.Instance()")]
|
||||
public unsafe Framework* GetFramework() {
|
||||
return (Framework*) this.Framework.Address.BaseAddress;
|
||||
}
|
||||
|
@ -138,7 +139,7 @@ namespace XivCommon {
|
|||
/// Gets the pointer to the UI module
|
||||
/// </summary>
|
||||
/// <returns>Pointer</returns>
|
||||
[Obsolete("Use GetFramework()->GetUiModule()")]
|
||||
[Obsolete("Use Framework.Instance()->GetUiModule()")]
|
||||
public unsafe IntPtr GetUiModule() {
|
||||
return (IntPtr) this.GetFramework()->GetUiModule();
|
||||
}
|
||||
|
@ -147,7 +148,7 @@ namespace XivCommon {
|
|||
/// Gets the pointer to the RaptureAtkModule
|
||||
/// </summary>
|
||||
/// <returns>Pointer</returns>
|
||||
[Obsolete("Use GetFramework()->GetUiModule()->GetRaptureAtkModule()")]
|
||||
[Obsolete("Use Framework.Instance()->GetUiModule()->GetRaptureAtkModule()")]
|
||||
public unsafe IntPtr GetAtkModule() {
|
||||
return (IntPtr) this.GetFramework()->GetUiModule()->GetRaptureAtkModule();
|
||||
}
|
||||
|
@ -156,7 +157,7 @@ namespace XivCommon {
|
|||
/// Gets the pointer to the agent module
|
||||
/// </summary>
|
||||
/// <returns>Pointer</returns>
|
||||
[Obsolete("Use GetFramework()->GetUiModule()->GetAgentModule()")]
|
||||
[Obsolete("Use Framework.Instance()->GetUiModule()->GetAgentModule()")]
|
||||
public unsafe IntPtr GetAgentModule() {
|
||||
return (IntPtr) this.GetFramework()->GetUiModule()->GetAgentModule();
|
||||
}
|
||||
|
@ -167,7 +168,7 @@ namespace XivCommon {
|
|||
/// <param name="id">internal id of agent</param>
|
||||
/// <returns>Pointer</returns>
|
||||
/// <exception cref="InvalidOperationException">if the signature for the function could not be found</exception>
|
||||
[Obsolete("Use GetFramework()->GetUiModule()->GetAgentModule()->GetAgentByInternalId(AgentId)")]
|
||||
[Obsolete("Use Framework.Instance()->GetUiModule()->GetAgentModule()->GetAgentByInternalId(AgentId)")]
|
||||
public unsafe IntPtr GetAgentByInternalId(uint id) {
|
||||
return (IntPtr) this.GetFramework()->GetUiModule()->GetAgentModule()->GetAgentByInternalId((AgentId) id);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<LangVersion>latest</LangVersion>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>3.2.0</Version>
|
||||
<Version>4.0.0-alpha.1</Version>
|
||||
<DebugType>full</DebugType>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
Loading…
Reference in New Issue