refactor: update for API 7
This commit is contained in:
parent
8631412a78
commit
81099651bc
|
@ -39,7 +39,7 @@ namespace XivCommon.Functions {
|
|||
this.AddBattleTalk = Marshal.GetDelegateForFunctionPointer<AddBattleTalkDelegate>(addBattleTalkPtr);
|
||||
|
||||
if (this.HookEnabled) {
|
||||
this.AddBattleTalkHook = new Hook<AddBattleTalkDelegate>(addBattleTalkPtr, this.AddBattleTalkDetour);
|
||||
this.AddBattleTalkHook = Hook<AddBattleTalkDelegate>.FromAddress(addBattleTalkPtr, this.AddBattleTalkDetour);
|
||||
this.AddBattleTalkHook.Enable();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -64,12 +64,12 @@ namespace XivCommon.Functions {
|
|||
}
|
||||
|
||||
if (scanner.TryScanText(Signatures.ChatBubbleOpen, out var openPtr, "chat bubbles open")) {
|
||||
this.OpenChatBubbleHook = new Hook<OpenChatBubbleDelegate>(openPtr, this.OpenChatBubbleDetour);
|
||||
this.OpenChatBubbleHook = Hook<OpenChatBubbleDelegate>.FromAddress(openPtr, this.OpenChatBubbleDetour);
|
||||
this.OpenChatBubbleHook.Enable();
|
||||
}
|
||||
|
||||
if (scanner.TryScanText(Signatures.ChatBubbleUpdate, out var updatePtr, "chat bubbles update")) {
|
||||
this.UpdateChatBubbleHook = new Hook<UpdateChatBubbleDelegate>(updatePtr + 9, this.UpdateChatBubbleDetour);
|
||||
this.UpdateChatBubbleHook = Hook<UpdateChatBubbleDelegate>.FromAddress(updatePtr + 9, this.UpdateChatBubbleDetour);
|
||||
this.UpdateChatBubbleHook.Enable();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ namespace XivCommon.Functions.NamePlates {
|
|||
|
||||
if (scanner.TryScanText(Signatures.NamePlateUpdate, out var updatePtr)) {
|
||||
unsafe {
|
||||
this._namePlateUpdateHook = new Hook<NamePlateUpdateDelegate>(updatePtr, this.NamePlateUpdateDetour);
|
||||
this._namePlateUpdateHook = Hook<NamePlateUpdateDelegate>.FromAddress(updatePtr, this.NamePlateUpdateDetour);
|
||||
}
|
||||
|
||||
this._namePlateUpdateHook.Enable();
|
||||
|
|
|
@ -73,13 +73,13 @@ namespace XivCommon.Functions {
|
|||
this.RequestPartyFinderListings = Marshal.GetDelegateForFunctionPointer<RequestPartyFinderListingsDelegate>(requestPfPtr);
|
||||
|
||||
if (this.ListingsEnabled) {
|
||||
this.RequestPfListingsHook = new Hook<RequestPartyFinderListingsDelegate>(requestPfPtr, this.OnRequestPartyFinderListings);
|
||||
this.RequestPfListingsHook = Hook<RequestPartyFinderListingsDelegate>.FromAddress(requestPfPtr, this.OnRequestPartyFinderListings);
|
||||
this.RequestPfListingsHook.Enable();
|
||||
}
|
||||
}
|
||||
|
||||
if (this.JoinsEnabled && scanner.TryScanText(Signatures.JoinCrossParty, out var joinPtr, "Party Finder joins")) {
|
||||
this.JoinPfHook = new Hook<JoinPfDelegate>(joinPtr, this.JoinPfDetour);
|
||||
this.JoinPfHook = Hook<JoinPfDelegate>.FromAddress(joinPtr, this.JoinPfDetour);
|
||||
this.JoinPfHook.Enable();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ namespace XivCommon.Functions {
|
|||
}
|
||||
|
||||
if (scanner.TryScanText(Signatures.ShowMessageBox, out var showMessageBoxPtr, "Talk")) {
|
||||
this.AddonTalkV45Hook = new Hook<AddonTalkV45Delegate>(showMessageBoxPtr, this.AddonTalkV45Detour);
|
||||
this.AddonTalkV45Hook = Hook<AddonTalkV45Delegate>.FromAddress(showMessageBoxPtr, this.AddonTalkV45Detour);
|
||||
this.AddonTalkV45Hook.Enable();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ namespace XivCommon.Functions.Tooltips {
|
|||
|
||||
if (scanner.TryScanText(Signatures.AgentItemDetailUpdateTooltip, out var updateItemPtr, "Tooltips - Items")) {
|
||||
unsafe {
|
||||
this.ItemUpdateTooltipHook = new Hook<ItemUpdateTooltipDelegate>(updateItemPtr, this.ItemUpdateTooltipDetour);
|
||||
this.ItemUpdateTooltipHook = Hook<ItemUpdateTooltipDelegate>.FromAddress(updateItemPtr, this.ItemUpdateTooltipDetour);
|
||||
}
|
||||
|
||||
this.ItemUpdateTooltipHook.Enable();
|
||||
|
@ -86,7 +86,7 @@ namespace XivCommon.Functions.Tooltips {
|
|||
|
||||
if (scanner.TryScanText(Signatures.AgentActionDetailUpdateTooltip, out var updateActionPtr, "Tooltips - Actions")) {
|
||||
unsafe {
|
||||
this.ActionGenerateTooltipHook = new Hook<ActionUpdateTooltipDelegate>(updateActionPtr, this.ActionUpdateTooltipDetour);
|
||||
this.ActionGenerateTooltipHook = Hook<ActionUpdateTooltipDelegate>.FromAddress(updateActionPtr, this.ActionUpdateTooltipDetour);
|
||||
}
|
||||
|
||||
this.ActionGenerateTooltipHook.Enable();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5-windows</TargetFramework>
|
||||
<TargetFramework>net6-windows</TargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<Nullable>enable</Nullable>
|
||||
|
@ -14,7 +14,7 @@
|
|||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<Title>XivCommon</Title>
|
||||
<Authors>ascclemens</Authors>
|
||||
<RepositoryUrl>https://git.sr.ht/~jkcclemens/XivCommon</RepositoryUrl>
|
||||
<RepositoryUrl>https://git.annaclemens.io/ascclemens/XivCommon</RepositoryUrl>
|
||||
<Description>A set of common functions, hooks, and events not included in Dalamud.</Description>
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
</PropertyGroup>
|
||||
|
@ -23,8 +23,8 @@
|
|||
<Dalamud>$(AppData)\XIVLauncher\addon\Hooks\dev</Dalamud>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Linux'))">
|
||||
<Dalamud>$(HOME)/games/final-fantasy-xiv-online/drive_c/users/$(USER)/AppData/Roaming/XIVLauncher/addon/Hooks/dev</Dalamud>
|
||||
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))'">
|
||||
<Dalamud>$(DALAMUD_HOME)</Dalamud>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(IsCI)' == 'true'">
|
||||
|
|
Loading…
Reference in New Issue