mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-28 03:19:19 +01:00
Add AddonLifecycle Service (#1361)
Adds new service to manage addon lifecycle events, such as setup/teardown.
This commit is contained in:
parent
49bffccf82
commit
efefcd70cf
3 changed files with 246 additions and 0 deletions
27
Dalamud/Game/AddonLifecycle/AddonLifecycleAddressResolver.cs
Normal file
27
Dalamud/Game/AddonLifecycle/AddonLifecycleAddressResolver.cs
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
namespace Dalamud.Game.AddonLifecycle;
|
||||
|
||||
/// <summary>
|
||||
/// AddonLifecycleService memory address resolver.
|
||||
/// </summary>
|
||||
internal class AddonLifecycleAddressResolver : BaseAddressResolver
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the address of the addon setup hook invoked by the atkunitmanager.
|
||||
/// </summary>
|
||||
public nint AddonSetup { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the address of the addon finalize hook invoked by the atkunitmanager.
|
||||
/// </summary>
|
||||
public nint AddonFinalize { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Scan for and setup any configured address pointers.
|
||||
/// </summary>
|
||||
/// <param name="sig">The signature scanner to facilitate setup.</param>
|
||||
protected override void Setup64Bit(SigScanner sig)
|
||||
{
|
||||
this.AddonSetup = sig.ScanText("E8 ?? ?? ?? ?? 8B 83 ?? ?? ?? ?? C1 E8 14");
|
||||
this.AddonFinalize = sig.ScanText("E8 ?? ?? ?? ?? 48 8B 7C 24 ?? 41 8B C6");
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue