diff --git a/Dalamud/Game/ClientState/Actors/Types/Actor.cs b/Dalamud/Game/ClientState/Actors/Types/Actor.cs
index caed4962d..431f3163f 100644
--- a/Dalamud/Game/ClientState/Actors/Types/Actor.cs
+++ b/Dalamud/Game/ClientState/Actors/Types/Actor.cs
@@ -65,5 +65,10 @@ namespace Dalamud.Game.ClientState.Actors.Types {
/// The Y distance from the local player in yalms.
///
public byte YalmDistanceY => this.actorStruct.YalmDistanceFromPlayerY;
+
+ ///
+ /// The target of the actor
+ ///
+ public virtual int TargetActorID => 0;
}
}
diff --git a/Dalamud/Game/ClientState/Actors/Types/NonPlayer/BattleNpc.cs b/Dalamud/Game/ClientState/Actors/Types/NonPlayer/BattleNpc.cs
index b4be1321e..dde8fd385 100644
--- a/Dalamud/Game/ClientState/Actors/Types/NonPlayer/BattleNpc.cs
+++ b/Dalamud/Game/ClientState/Actors/Types/NonPlayer/BattleNpc.cs
@@ -22,5 +22,11 @@ namespace Dalamud.Game.ClientState.Actors.Types.NonPlayer {
/// The ID of this BattleNpc's owner.
///
public int OwnerId => this.actorStruct.OwnerId;
+
+ ///
+ /// Target of the Battle NPC
+ ///
+ public override int TargetActorID => this.actorStruct.BattleNpcTargetActorId;
+
}
}
diff --git a/Dalamud/Game/ClientState/Actors/Types/PlayerCharacter.cs b/Dalamud/Game/ClientState/Actors/Types/PlayerCharacter.cs
index 366794513..1df1483da 100644
--- a/Dalamud/Game/ClientState/Actors/Types/PlayerCharacter.cs
+++ b/Dalamud/Game/ClientState/Actors/Types/PlayerCharacter.cs
@@ -29,5 +29,11 @@ namespace Dalamud.Game.ClientState.Actors.Types {
/// The Free Company tag of this player.
///
public string CompanyTag => Encoding.UTF8.GetString(this.actorStruct.CompanyTag).Substring(2).Replace("\0", "");
+
+ ///
+ /// Target of the PlayerCharacter
+ ///
+ public override int TargetActorID => this.actorStruct.PlayerCharacterTargetActorId;
+
}
}
diff --git a/Dalamud/Game/ClientState/Structs/Actor.cs b/Dalamud/Game/ClientState/Structs/Actor.cs
index b8cf25680..0d7c9e50a 100644
--- a/Dalamud/Game/ClientState/Structs/Actor.cs
+++ b/Dalamud/Game/ClientState/Structs/Actor.cs
@@ -30,7 +30,8 @@ namespace Dalamud.Game.ClientState.Structs
[FieldOffset(0x17B8)] [MarshalAs(UnmanagedType.ByValArray, SizeConst = 28)] public byte[] Customize;
- [FieldOffset(0x17F8)] public int TargetActorId;
+ [FieldOffset(0x1F0)] public int PlayerCharacterTargetActorId;
+ [FieldOffset(0x17F8)] public int BattleNpcTargetActorId;
// This field can't be correctly aligned, so we have to cut it manually.
[FieldOffset(0x17d0)] [MarshalAs(UnmanagedType.ByValArray, SizeConst = 7)]