mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-27 10:59:18 +01:00
[Api13] Add native wrapper structs (#2330)
This commit is contained in:
parent
b425ee0a2a
commit
57c6089fc1
23 changed files with 682 additions and 149 deletions
|
|
@ -81,7 +81,7 @@ public unsafe partial class AddonTree : IDisposable
|
|||
{
|
||||
var ptr = GameGui.GetAddonByName(name);
|
||||
|
||||
if ((AtkUnitBase*)ptr != null)
|
||||
if (!ptr.IsNull)
|
||||
{
|
||||
if (AddonTrees.TryGetValue(name, out var tree))
|
||||
{
|
||||
|
|
@ -152,7 +152,7 @@ public unsafe partial class AddonTree : IDisposable
|
|||
var uldManager = addon->UldManager;
|
||||
|
||||
PrintFieldValuePair("Address", $"{(nint)addon:X}");
|
||||
PrintFieldValuePair("Agent", $"{GameGui.FindAgentInterface(addon):X}");
|
||||
PrintFieldValuePair("Agent", $"{(nint)GameGui.FindAgentInterface(addon):X}");
|
||||
|
||||
PrintFieldValuePairs(
|
||||
("X", $"{addon->X}"),
|
||||
|
|
@ -234,7 +234,7 @@ public unsafe partial class AddonTree : IDisposable
|
|||
/// <returns>true if the addon is found.</returns>
|
||||
private bool ValidateAddon(out AtkUnitBase* addon)
|
||||
{
|
||||
addon = (AtkUnitBase*)GameGui.GetAddonByName(this.AddonName);
|
||||
addon = GameGui.GetAddonByName(this.AddonName).Struct;
|
||||
if (addon == null || (nint)addon != this.InitialPtr)
|
||||
{
|
||||
this.Dispose();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue