diff --git a/FFXIVClientStructs/FFXIV/Client/UI/Misc/RaptureHotbarModule.HotbarUiIntermediate.cs b/FFXIVClientStructs/FFXIV/Client/UI/Misc/RaptureHotbarModule.HotbarUiIntermediate.cs index 7d22240043..b8e089e0cb 100644 --- a/FFXIVClientStructs/FFXIV/Client/UI/Misc/RaptureHotbarModule.HotbarUiIntermediate.cs +++ b/FFXIVClientStructs/FFXIV/Client/UI/Misc/RaptureHotbarModule.HotbarUiIntermediate.cs @@ -4,15 +4,11 @@ public partial struct RaptureHotbarModule { /// /// An intermediate struct used to translate from a to the UI String/NumberArrays. /// - /// - /// Do not consider this struct stable (yet). - /// + [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 @@ -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(); } } diff --git a/FFXIVClientStructs/FFXIV/Client/UI/Misc/RaptureHotbarModule.cs b/FFXIVClientStructs/FFXIV/Client/UI/Misc/RaptureHotbarModule.cs index 7b895512b5..57d0a5f7f3 100644 --- a/FFXIVClientStructs/FFXIV/Client/UI/Misc/RaptureHotbarModule.cs +++ b/FFXIVClientStructs/FFXIV/Client/UI/Misc/RaptureHotbarModule.cs @@ -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); + /// + /// Load (most) intermediate data from a hotbar slot. + /// + /// Generally called via PrepareSlotForRender, consider using that instead. + /// The hotbar slot to resolve. Will be mutated! + /// The intermediate to write to. + /// A bool indicating successful load (?) + [MemberFunction("E8 ?? ?? ?? ?? 88 83 ?? ?? ?? ?? 48 83 C4 40")] + public partial bool PopulateIntermediateFromSlot(HotbarSlot* slot, HotbarUIIntermediate* intermediate); + + /// + /// Prepares a hotbar slot for UI render. + /// *Requires* that the slot's and + /// be set prior to calling (generally via ). + /// + /// The hotbar slot to resolve. Will be mutated! + /// The intermediate to write to. + [MemberFunction("E8 ?? ?? ?? ?? FF C6 83 C5 11")] + public partial void PrepareSlotForRender(HotbarSlot* slot, HotbarUIIntermediate* intermediate); + /// /// 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. diff --git a/ida/data.yml b/ida/data.yml index 34517a678a..7ec8292ec0 100644 --- a/ida/data.yml +++ b/ida/data.yml @@ -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 @@ -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