mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-03 14:23:40 +01:00
Fix incorrect AtkUnitBase.Update function delegate definition
This commit is contained in:
parent
9176342ad5
commit
8cb76a7438
2 changed files with 6 additions and 10 deletions
|
|
@ -55,7 +55,7 @@ internal unsafe class AddonLifecycle : IDisposable, IServiceType
|
|||
|
||||
private delegate void AddonDrawDelegate(AtkUnitBase* addon);
|
||||
|
||||
private delegate void AddonUpdateDelegate(AtkUnitBase* addon);
|
||||
private delegate void AddonUpdateDelegate(AtkUnitBase* addon, float delta);
|
||||
|
||||
/// <inheritdoc/>
|
||||
public void Dispose()
|
||||
|
|
@ -174,8 +174,6 @@ internal unsafe class AddonLifecycle : IDisposable, IServiceType
|
|||
|
||||
private void OnAddonDraw(AtkUnitBase* addon)
|
||||
{
|
||||
if (addon is null) return;
|
||||
|
||||
try
|
||||
{
|
||||
this.InvokeListeners(AddonEvent.PreDraw, new IAddonLifecycle.AddonArgs { Addon = (nint)addon });
|
||||
|
|
@ -185,7 +183,7 @@ internal unsafe class AddonLifecycle : IDisposable, IServiceType
|
|||
Log.Error(e, "Exception in OnAddonDraw pre-draw invoke.");
|
||||
}
|
||||
|
||||
((delegate* unmanaged<AtkUnitBase*, void>)addon->AtkEventListener.vfunc[42])(addon);
|
||||
addon->Draw();
|
||||
|
||||
try
|
||||
{
|
||||
|
|
@ -197,10 +195,8 @@ internal unsafe class AddonLifecycle : IDisposable, IServiceType
|
|||
}
|
||||
}
|
||||
|
||||
private void OnAddonUpdate(AtkUnitBase* addon)
|
||||
private void OnAddonUpdate(AtkUnitBase* addon, float delta)
|
||||
{
|
||||
if (addon is null) return;
|
||||
|
||||
try
|
||||
{
|
||||
this.InvokeListeners(AddonEvent.PreUpdate, new IAddonLifecycle.AddonArgs { Addon = (nint)addon });
|
||||
|
|
@ -209,8 +205,8 @@ internal unsafe class AddonLifecycle : IDisposable, IServiceType
|
|||
{
|
||||
Log.Error(e, "Exception in OnAddonUpdate pre-update invoke.");
|
||||
}
|
||||
|
||||
((delegate* unmanaged<AtkUnitBase*, void>)addon->AtkEventListener.vfunc[41])(addon);
|
||||
|
||||
addon->Update(delta);
|
||||
|
||||
try
|
||||
{
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ internal class AddonLifecycleAddressResolver : BaseAddressResolver
|
|||
{
|
||||
this.AddonSetup = sig.ScanText("E8 ?? ?? ?? ?? 8B 83 ?? ?? ?? ?? C1 E8 14");
|
||||
this.AddonFinalize = sig.ScanText("E8 ?? ?? ?? ?? 48 8B 7C 24 ?? 41 8B C6");
|
||||
this.AddonDraw = sig.ScanText("48 8B 01 FF 90 ?? ?? ?? ?? 83 EB 01 79 C1");
|
||||
this.AddonDraw = sig.ScanText("FF 90 ?? ?? ?? ?? 83 EB 01 79 C1");
|
||||
this.AddonUpdate = sig.ScanText("FF 90 ?? ?? ?? ?? 40 88 AF");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue