mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
Fix build
This commit is contained in:
parent
59003f8cd5
commit
a358331b9f
6 changed files with 7 additions and 9 deletions
|
|
@ -140,7 +140,7 @@ internal unsafe class PluginEventController : IDisposable
|
|||
if (currentAddonPointer != eventEntry.Addon) return;
|
||||
|
||||
// Make sure the addon is not unloaded
|
||||
var atkUnitBase = (AtkUnitBase*)currentAddonPointer;
|
||||
var atkUnitBase = currentAddonPointer.Struct;
|
||||
if (atkUnitBase->UldManager.LoadedState == AtkLoadState.Unloaded) return;
|
||||
|
||||
// Does this addon contain the node this event is for? (by address)
|
||||
|
|
|
|||
|
|
@ -330,7 +330,7 @@ internal sealed unsafe class DtrBar : IInternalDisposableService, IDtrBar
|
|||
this.entriesReadOnlyCopy = null;
|
||||
}
|
||||
|
||||
private AtkUnitBase* GetDtr() => (AtkUnitBase*)this.gameGui.GetAddonByName("_DTR").ToPointer();
|
||||
private AtkUnitBase* GetDtr() => this.gameGui.GetAddonByName("_DTR").Struct;
|
||||
|
||||
private void Update(IFramework unused)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ internal sealed class NamePlateGui : IInternalDisposableService, INamePlateGui
|
|||
/// <inheritdoc/>
|
||||
public unsafe void RequestRedraw()
|
||||
{
|
||||
var addon = (AddonNamePlate*)this.gameGui.GetAddonByName("NamePlate");
|
||||
var addon = (AddonNamePlate*)(nint)this.gameGui.GetAddonByName("NamePlate");
|
||||
if (addon != null)
|
||||
{
|
||||
addon->DoFullUpdate = 1;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Numerics;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
using FFXIVClientStructs.FFXIV.Component.GUI;
|
||||
using FFXIVClientStructs.Interop;
|
||||
|
||||
namespace Dalamud.Game.Gui.NativeWrapper;
|
||||
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
{
|
||||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using Dalamud.Game.Gui;
|
||||
using Dalamud.Game.Gui;
|
||||
using Dalamud.Memory;
|
||||
using Dalamud.Utility;
|
||||
using ImGuiNET;
|
||||
|
|
@ -48,7 +48,7 @@ internal unsafe class AddonWidget : IDataWindowWidget
|
|||
return;
|
||||
}
|
||||
|
||||
var addon = (FFXIVClientStructs.FFXIV.Component.GUI.AtkUnitBase*)address;
|
||||
var addon = address.Struct;
|
||||
var name = addon->NameString;
|
||||
ImGui.TextUnformatted($"{name} - {Util.DescribeAddress(address)}\n v:{addon->IsVisible} x:{addon->X} y:{addon->Y} s:{addon->Scale}, w:{addon->RootNode->Width}, h:{addon->RootNode->Height}");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue