fix: update some offsets and sigs

This commit is contained in:
Anna 2021-12-05 18:20:32 -05:00
parent a1505c2f5f
commit 7fa6f2bc4b
8 changed files with 22 additions and 22 deletions

View File

@ -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) {

View File

@ -21,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";
}

View File

@ -43,7 +43,7 @@ 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
@ -58,7 +58,7 @@ namespace XivCommon.Functions {
*(raw + 11) = objectId;
*(raw + 12) = objectId;
*(raw + 13) = 0xE0000000;
*(raw + 311) = 0;
*(raw + 301) = 0;
this.RequestCharacterInfo(rciData);
}

View File

@ -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 {

View File

@ -12,7 +12,7 @@ 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 delegate IntPtr OpenQuestDelegate(IntPtr agent, int questId, int a3, ushort a4, byte a5);

View File

@ -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;

View File

@ -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;

View File

@ -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";
}