Merge pull request #316 from fitzchivalrik/feature/add-softtarget-offset

This commit is contained in:
goaaats 2021-04-14 16:16:33 +02:00 committed by GitHub
commit 4a2c30a257
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -8,6 +8,7 @@ namespace Dalamud.Game.ClientState.Actors {
public const int MouseOverTarget = 0xD0;
public const int FocusTarget = 0xF8;
public const int PreviousTarget = 0x110;
public const int SoftTarget = 0x88;
}
public sealed class Targets {
@ -18,6 +19,7 @@ namespace Dalamud.Game.ClientState.Actors {
public Actor MouseOverTarget => GetActorByOffset(TargetOffsets.MouseOverTarget);
public Actor FocusTarget => GetActorByOffset(TargetOffsets.FocusTarget);
public Actor PreviousTarget => GetActorByOffset(TargetOffsets.PreviousTarget);
public Actor SoftTarget => GetActorByOffset(TargetOffsets.SoftTarget);
internal Targets(Dalamud dalamud, ClientStateAddressResolver addressResolver) {
this.dalamud = dalamud;

View file

@ -556,6 +556,9 @@ namespace Dalamud.Interface
if (targetMgr.PreviousTarget != null)
this.PrintActor(targetMgr.PreviousTarget, "PreviousTarget");
if (targetMgr.SoftTarget != null)
this.PrintActor(targetMgr.SoftTarget, "SoftTarget");
if (ImGui.Button("Clear CT"))
targetMgr.ClearCurrentTarget();