mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
Add Targets to TargetManager (#1364)
This commit is contained in:
parent
a12d9df9a2
commit
633894364d
3 changed files with 32 additions and 0 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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; }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue