Add Targets to TargetManager (#1364)

This commit is contained in:
MidoriKami 2023-09-07 10:12:19 -07:00 committed by GitHub
parent a12d9df9a2
commit 633894364d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 32 additions and 0 deletions

View file

@ -70,6 +70,20 @@ public sealed unsafe class TargetManager : IServiceType, ITargetManager
set => this.SetSoftTarget(value);
}
/// <inheritdoc/>
public GameObject? GPoseTarget
{
get => this.objectTable.CreateObjectReference((IntPtr)Struct->GPoseTarget);
set => Struct->GPoseTarget = (FFXIVClientStructs.FFXIV.Client.Game.Object.GameObject*)value?.Address;
}
/// <inheritdoc/>
public GameObject? MouseOverNameplateTarget
{
get => this.objectTable.CreateObjectReference((IntPtr)Struct->MouseOverNameplateTarget);
set => Struct->MouseOverNameplateTarget = (FFXIVClientStructs.FFXIV.Client.Game.Object.GameObject*)value?.Address;
}
private FFXIVClientStructs.FFXIV.Client.Game.Control.TargetSystem* Struct => (FFXIVClientStructs.FFXIV.Client.Game.Control.TargetSystem*)this.Address;
/// <summary>

View file

@ -63,6 +63,12 @@ internal class TargetWidget : IDataWindowWidget
if (targetMgr.SoftTarget != null)
Util.PrintGameObject(targetMgr.SoftTarget, "SoftTarget", this.resolveGameData);
if (targetMgr.GPoseTarget != null)
Util.PrintGameObject(targetMgr.GPoseTarget, "GPoseTarget", this.resolveGameData);
if (targetMgr.MouseOverNameplateTarget != null)
Util.PrintGameObject(targetMgr.MouseOverNameplateTarget, "MouseOverNameplateTarget", this.resolveGameData);
if (ImGui.Button("Clear CT"))
targetMgr.Target = null;

View file

@ -41,4 +41,16 @@ public interface ITargetManager
/// Set to null to clear the target.
/// </summary>
public GameObject? SoftTarget { get; set; }
/// <summary>
/// Gets or sets the gpose target.
/// Set to null to clear the target.
/// </summary>
public GameObject? GPoseTarget { get; set; }
/// <summary>
/// Gets or sets the mouseover nameplate target.
/// Set to null to clear the target.
/// </summary>
public GameObject? MouseOverNameplateTarget { get; set; }
}