Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions FFXIVClientStructs/FFXIV/Client/Game/Character/Character.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,16 @@ public unsafe partial struct Character {
[MemberFunction("E8 ?? ?? ?? ?? 84 C0 75 05 8B 4D F4")]
public partial bool IsInPvP();

/// <summary>
/// Resolves the correct emote id, based on the targets height or distance.
/// </summary>
/// <param name="emoteId">The base emote id.</param>
/// <param name="options">The PlayEmote options.</param>
/// <returns> The adjusted emote id for the target. </returns>
/// <remarks> For example, this is used for Throw/Snowball, Dote, Splash, All Saints' Charm, Bouquet or Photograph. </remarks>
[MemberFunction("E8 ?? ?? ?? ?? 48 8B 5D ?? 0F B7 F8")]
public partial ushort ResolveTargetedEmoteId(ushort emoteId, EmoteController.PlayEmoteOption* options); // TODO: judging from the address, this might be a static function

[VirtualFunction(77)]
public partial StatusManager* GetStatusManager();

Expand Down
20 changes: 17 additions & 3 deletions FFXIVClientStructs/FFXIV/Client/Game/Control/EmoteController.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using FFXIVClientStructs.FFXIV.Client.Game.Character;
using FFXIVClientStructs.FFXIV.Client.Game.Object;
using FFXIVClientStructs.FFXIV.Client.LayoutEngine;
using FFXIVClientStructs.FFXIV.Client.UI.Agent;

namespace FFXIVClientStructs.FFXIV.Client.Game.Control;

Expand All @@ -10,11 +11,23 @@ namespace FFXIVClientStructs.FFXIV.Client.Game.Control;
public unsafe partial struct EmoteController {
[FieldOffset(0x08)] public BattleChara* OwnerObject;
[FieldOffset(0x14)] public ushort EmoteId;
[FieldOffset(0x16)] private ushort Unk1; // Seems to be 1 when close enough to a target that height adjustment is needed, maybe.
[FieldOffset(0x16)] public byte Stance;
[FieldOffset(0x17)] private byte Unk17;
[FieldOffset(0x18)] public GameObjectId Target;
[FieldOffset(0x20)] public PoseType CurrentPoseType;
[FieldOffset(0x21)] public byte CPoseState;

[MemberFunction("E8 ?? ?? ?? ?? 84 C0 75 ?? 48 39 5D")]
public partial bool IsEmoting(); // EmoteId != 0

[MemberFunction("E8 ?? ?? ?? ?? 84 C0 74 ?? 33 D2 48 8D 8E")]
public partial bool IsInEmoteLoop(); // OwnerObject->Mode == CharacterModes.EmoteLoop

/// <summary> Plays an emote for a character that's not the local player. </summary>
/// <remarks> For the local player, use <see cref="AgentEmote.ExecuteEmote"/> or <see cref="EmoteManager.ExecuteEmote(ushort, PlayEmoteOption*)"/> instead. </remarks>
[MemberFunction("E8 ?? ?? ?? ?? E8 ?? ?? ?? ?? 44 0F B7 44 24")]
public partial bool PlayEmote(uint emoteId, PlayEmoteOption* options);

[MemberFunction("E8 ?? ?? ?? ?? 8B F8 83 F8 FF 0F 84 ?? ?? ?? ?? 8B CF")]
public partial int GetPoseKind();

Expand All @@ -40,9 +53,10 @@ public enum PoseType : byte {
[VirtualTable("48 8D 05 ?? ?? ?? ?? 48 8D 0D ?? ?? ?? ?? 48 89 44 24", 3)]
public partial struct PlayEmoteOption {
[FieldOffset(0x08)] public GameObjectId TargetId;
/// <remarks> If bit 1 is set it does not display a log message. </remarks>
[BitField<bool>(nameof(DisableLogMessage), 0, 1)]
[FieldOffset(0x10)] public byte Flags;
[FieldOffset(0x11)] private bool Unk11;
/// <remarks> For example, this might be useful to set for spawning characters in a sitting pose. </remarks>
[FieldOffset(0x11)] public bool DisableSitDownAnimation; // or DisableInitAnimation?
[FieldOffset(0x18)] public ILayoutInstance* Layout;
}
}
2 changes: 2 additions & 0 deletions ida/data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10955,6 +10955,7 @@ classes:
0x14087FB60: HasStatus
0x1408AF6E0: IsJumping
0x140ADBB00: IsInPvP
0x1405F62D0: ResolveTargetedEmoteId # static?
Client::Game::Character::Character::CastInfo:
funcs:
0x1408B3190: Reset
Expand Down Expand Up @@ -11012,6 +11013,7 @@ classes:
0x1405F4B00: GetAvailablePoses
0x1405F4B50: Initialize
0x1405F5390: SetPose
0x1405F5470: PlayEmote
0x1405F5870: IsEmoting
0x1405F58B0: IsInEmoteLoop
0x1405F77C0: GetPoseState
Expand Down
Loading