diff --git a/Dalamud/Game/ClientState/Objects/Types/GameObject.cs b/Dalamud/Game/ClientState/Objects/Types/GameObject.cs index 4f371bd28..b0504fbcc 100644 --- a/Dalamud/Game/ClientState/Objects/Types/GameObject.cs +++ b/Dalamud/Game/ClientState/Objects/Types/GameObject.cs @@ -12,6 +12,11 @@ namespace Dalamud.Game.ClientState.Objects.Types /// public unsafe partial class GameObject : IEquatable { + /// + /// IDs of non-networked GameObjects. + /// + public const uint InvalidGameObjectId = 0xE0000000; + /// /// Initializes a new instance of the class. /// @@ -156,7 +161,8 @@ namespace Dalamud.Game.ClientState.Objects.Types /// /// This iterates the actor table, it should be used with care. /// - public virtual GameObject? TargetObject => Service.Get().SearchById(this.TargetObjectId); + // TODO: Fix for non-networked GameObjects + public virtual GameObject? TargetObject => this.TargetObjectId != InvalidGameObjectId ? Service.Get().SearchById(this.TargetObjectId) : null; /// /// Gets the underlying structure.