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
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@ public partial struct RaptureHotbarModule {
/// <summary>
/// An intermediate struct used to translate from a <see cref="HotbarSlot"/> to the UI String/NumberArrays.
/// </summary>
/// <remarks>
/// <b>Do not consider this struct stable (yet).</b>
/// </remarks>
[GenerateInterop]
[StructLayout(LayoutKind.Explicit, Size = 0x43)]
internal unsafe struct HotbarUiIntermediate {
// Converts to array in E8 ?? ?? ?? ?? EB 34 E8

[FieldOffset(0x00)] public Utf8String* PopUpHelpText; // to StringArray idx slotBase + 14
[FieldOffset(0x08)] public nint CostTextPtr; // to StringArray idx slotBase + 1
public unsafe partial struct HotbarUIIntermediate {
[FieldOffset(0x00)] public CStringPointer PopUpHelpText; // ref to Client::UI::Misc::RaptureHotbarModule::HotbarSlot.PopUpHelp.StringPtr
[FieldOffset(0x08)] public CStringPointer CostTextPtr; // ref to Client::UI::Misc::RaptureHotbarModule::HotbarSlot.CostText
[FieldOffset(0x10)] public uint IntermediateActionType; // to NumberArray idx slotBase + 0
[FieldOffset(0x14)] public uint ActionId; // to NumberArray idx slotBase + 3
[FieldOffset(0x18)] public uint IconId; // to NumberArray idx slotBase + 4
Expand All @@ -31,5 +27,8 @@ internal unsafe struct HotbarUiIntermediate {
[FieldOffset(0x40)] public bool ActionTargetSatisfied; // to NumberArray idx slotBase + 15
[FieldOffset(0x41)] public bool DrawAnts; // to NumberArray idx slotBase + 14
[FieldOffset(0x42)] private byte Unk0x42;

[MemberFunction("E8 ?? ?? ?? ?? 48 8B 45 ?? 4C 8D 44 24")]
public partial HotbarUIIntermediate* Ctor();
}
}
20 changes: 20 additions & 0 deletions FFXIVClientStructs/FFXIV/Client/UI/Misc/RaptureHotbarModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,26 @@ public unsafe partial struct RaptureHotbarModule {
[MemberFunction("4C 8B C9 41 83 F8 10 73 45")]
public partial byte ExecuteSlotById(uint hotbarId, uint slotId);

/// <summary>
/// Load (most) intermediate data from a hotbar slot.
/// </summary>
/// <seealso cref="PrepareSlotForRender">Generally called via PrepareSlotForRender, consider using that instead.</seealso>
/// <param name="slot">The hotbar slot to resolve. <i>Will be mutated!</i></param>
/// <param name="intermediate">The intermediate to write to.</param>
/// <returns>A bool indicating successful load (?)</returns>
[MemberFunction("E8 ?? ?? ?? ?? 88 83 ?? ?? ?? ?? 48 83 C4 40")]
public partial bool PopulateIntermediateFromSlot(HotbarSlot* slot, HotbarUIIntermediate* intermediate);

/// <summary>
/// Prepares a hotbar slot for UI render.
/// *Requires* that the slot's <see cref="HotbarSlot.ApparentSlotType"/> and <see cref="HotbarSlot.ApparentActionId"/>
/// be set prior to calling (generally via <see cref="GetSlotAppearance"/>).
/// </summary>
/// <param name="slot">The hotbar slot to resolve. <i>Will be mutated!</i></param>
/// <param name="intermediate">The intermediate to write to.</param>
[MemberFunction("E8 ?? ?? ?? ?? FF C6 83 C5 11")]
public partial void PrepareSlotForRender(HotbarSlot* slot, HotbarUIIntermediate* intermediate);

/// <summary>
/// Search through the hotbar module and delete all hotbar slots associated with the specified macro. Used when a user
/// deletes a specific macro from their list, and should affect saved (but unloaded) hotbars as well.
Expand Down
7 changes: 4 additions & 3 deletions ida/data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11392,7 +11392,8 @@ classes:
0x1407D2DF0: ClearPetCrossHotbarSlot # (this, slotId) -> nint
0x1407D2E10: ExecutePetHotbarSlot # (this, slotId) -> bool (?)
0x1407D2E30: ExecutePetCrossHotbarSlot # (this, slotId) -> bool (?)
0x1407D3480: PopulateIntermediateFromSlot # (this, HotbarSlot*, HotbarUiIntermediate*)
0x1407D3480: PopulateIntermediateFromSlot # (this, HotbarSlot*, HotbarUIIntermediate*)
0x1407D3280: PrepareSlotForRender # (this, HotbarSlot*, HotbarUIIntermediate*)
0x1407D7160: SetHotbarLocked
0x1407D71A0: IsHotbarLocked
0x1407D71E0: SetCrossHotbarLocked
Expand Down Expand Up @@ -11466,14 +11467,14 @@ classes:
0x1407CFCA0: IsSlotActionTargetInRange2 # (this, HotbarSlotType, uint) -> bool
0x1407CFC10: IsActionHighlighted # (this, commandType, commandId) -> bool
0x1407CFFC0: GetIntermediateActionType # (this) -> IntermediateActionType - ultimately passed to the NumberArray
0x1407D0680: PopulateIntermediateCooldownInfo # (this, HotbarUiIntermediate*)
0x1407D0680: PopulateIntermediateCooldownInfo # (this, HotbarUIIntermediate*)
0x1407D0520: GetAdjustedCommandId # ???
0x1407D15B0: LoadMacroSlot
0x1407D0820: GetSlotActionCooldownPercentage # (this, out int, int) -> int
Client::UI::Misc::RaptureHotbarModule::DutyActionSlot:
funcs:
0x1407D7D10: Initialize
Client::UI::Misc::RaptureHotbarModule::HotbarUiIntermediate:
Client::UI::Misc::RaptureHotbarModule::HotbarUIIntermediate:
funcs:
0x1407CE530: ctor
Client::UI::Misc::HudLayoutAddon: # just a bunch of static functions
Expand Down
Loading