Use AgentInterfacePtr

This commit is contained in:
MidoriKami 2026-01-09 12:51:08 -08:00
parent d0caf98eb3
commit f635673ce9

View file

@ -1,4 +1,6 @@
namespace Dalamud.Game.Agent.AgentArgTypes; using Dalamud.Game.NativeWrapper;
namespace Dalamud.Game.Agent.AgentArgTypes;
/// <summary> /// <summary>
/// Base class for AgentLifecycle AgentArgTypes. /// Base class for AgentLifecycle AgentArgTypes.
@ -15,7 +17,7 @@ public unsafe class AgentArgs
/// <summary> /// <summary>
/// Gets the pointer to the Agents AgentInterface*. /// Gets the pointer to the Agents AgentInterface*.
/// </summary> /// </summary>
public nint Agent { get; internal set; } public AgentInterfacePtr Agent { get; internal set; }
/// <summary> /// <summary>
/// Gets the agent id. /// Gets the agent id.
@ -33,5 +35,5 @@ public unsafe class AgentArgs
/// <typeparam name="T">AgentInterface.</typeparam> /// <typeparam name="T">AgentInterface.</typeparam>
/// <returns>Typed pointer to contained Agents AgentInterface.</returns> /// <returns>Typed pointer to contained Agents AgentInterface.</returns>
public T* GetAgentPointer<T>() where T : unmanaged public T* GetAgentPointer<T>() where T : unmanaged
=> (T*)this.Agent; => (T*)this.Agent.Address;
} }