mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
Subcribe to Framework's Update event from
This commit is contained in:
parent
2e86509a97
commit
c50fbfab5e
1 changed files with 7 additions and 0 deletions
|
|
@ -57,9 +57,15 @@ namespace Dalamud.Game.ClientState.Actors {
|
|||
Address = addressResolver;
|
||||
this.dalamud = dalamud;
|
||||
|
||||
dalamud.Framework.OnUpdateEvent += Framework_OnUpdateEvent;
|
||||
|
||||
Log.Verbose("Actor table address {ActorTable}", Address.ActorTable);
|
||||
}
|
||||
|
||||
private void Framework_OnUpdateEvent(Internal.Framework framework) {
|
||||
this.ResetCache();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get an actor at the specified spawn index.
|
||||
/// </summary>
|
||||
|
|
@ -140,6 +146,7 @@ namespace Dalamud.Game.ClientState.Actors {
|
|||
private void Dispose(bool disposing)
|
||||
{
|
||||
if (disposed) return;
|
||||
this.dalamud.Framework.OnUpdateEvent -= Framework_OnUpdateEvent;
|
||||
Marshal.FreeHGlobal(actorMem);
|
||||
disposed = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue