mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
Add TargetActorID
This commit is contained in:
parent
4bbcd526e9
commit
e8b244feba
4 changed files with 19 additions and 1 deletions
|
|
@ -65,5 +65,10 @@ namespace Dalamud.Game.ClientState.Actors.Types {
|
|||
/// The Y distance from the local player in yalms.
|
||||
/// </summary>
|
||||
public byte YalmDistanceY => this.actorStruct.YalmDistanceFromPlayerY;
|
||||
|
||||
/// <summary>
|
||||
/// The target of the actor
|
||||
/// </summary>
|
||||
public virtual int TargetActorID => 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,5 +22,11 @@ namespace Dalamud.Game.ClientState.Actors.Types.NonPlayer {
|
|||
/// The ID of this BattleNpc's owner.
|
||||
/// </summary>
|
||||
public int OwnerId => this.actorStruct.OwnerId;
|
||||
|
||||
/// <summary>
|
||||
/// Target of the Battle NPC
|
||||
/// </summary>
|
||||
public override int TargetActorID => this.actorStruct.BattleNpcTargetActorId;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,5 +29,11 @@ namespace Dalamud.Game.ClientState.Actors.Types {
|
|||
/// The Free Company tag of this player.
|
||||
/// </summary>
|
||||
public string CompanyTag => Encoding.UTF8.GetString(this.actorStruct.CompanyTag).Substring(2).Replace("\0", "");
|
||||
|
||||
/// <summary>
|
||||
/// Target of the PlayerCharacter
|
||||
/// </summary>
|
||||
public override int TargetActorID => this.actorStruct.PlayerCharacterTargetActorId;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue