Skip to content
Open
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
@@ -1,27 +1,35 @@
using FFXIVClientStructs.FFXIV.Client.UI.Misc;

namespace FFXIVClientStructs.FFXIV.Client.UI.Arrays.Common;

[GenerateInterop]
[StructLayout(LayoutKind.Explicit, Size = 17 * 4)]
public partial struct ActionBarSlotNumberArray {
[FieldOffset(0), FixedSizeArray, CExporterIgnore] internal FixedSizeArray17<int> _data;

[FieldOffset(0 * 4)] public int ActionType;
[FieldOffset(1 * 4)] private bool Unk1;
[FieldOffset(0 * 4), Obsolete("Use ActionTypeEnum")] public int ActionType;
[FieldOffset(0 * 4)] public RaptureHotbarModule.SlotActionType ActionTypeEnum; // maybe rename to ActionType, once ActionType can be removed?

[FieldOffset(1 * 4)] public int CostType;
[FieldOffset(3 * 4)] public uint ActionId;
[FieldOffset(4 * 4)] public uint IconId;
[FieldOffset(5 * 4)] public bool Executable;
[FieldOffset(6 * 4)] public bool Executable2;
[FieldOffset(7 * 4)] public int MaxCharges;

/// <summary>
/// Range is 0 to 100
/// </summary>
[FieldOffset(8 * 4)] public int GlobalCoolDownPercentage;

/// <summary>
/// Range is 0 to 100
/// </summary>
[FieldOffset(9 * 4)] public int ChargesCooldownPercent;

[FieldOffset(10 * 4)] public int RechargeTime; // Same slot as ManaCost (The game reuses this)
[FieldOffset(10 * 4), CExporterIgnore] public int ManaCost; // Same slot as RechargeTime (The game reuses this)
[FieldOffset(10 * 4), CExporterIgnore] public int ManaCost; // Same slot as RechargeTime (The game reuses this)

[FieldOffset(12 * 4)] public bool DisplayDot;
[FieldOffset(13 * 4)] public int CurrentCharges;
[FieldOffset(14 * 4)] public bool Glows;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ namespace FFXIVClientStructs.FFXIV.Client.UI.Misc;

public partial struct RaptureHotbarModule {
/// <summary>
/// An intermediate struct used to translate from a <see cref="HotbarSlot"/> to the UI String/NumberArrays.
/// An intermediate struct used to translate from a <see cref="HotbarSlot"/> to the UI String/NumberArrays.
/// </summary>
[GenerateInterop]
[StructLayout(LayoutKind.Explicit, Size = 0x43)]
public unsafe partial struct HotbarUIIntermediate {
[FieldOffset(0x00)] public CStringPointer PopUpHelpText; // ref to Client::UI::Misc::RaptureHotbarModule::HotbarSlot.PopUpHelp.StringPtr
[FieldOffset(0x08)] public CStringPointer CostText; // ref to Client::UI::Misc::RaptureHotbarModule::HotbarSlot.CostText
[FieldOffset(0x10)] public uint IntermediateActionType; // to NumberArray idx slotBase + 0
[FieldOffset(0x10), Obsolete("Use ActionType")] public uint IntermediateActionType; // to NumberArray idx slotBase + 0
[FieldOffset(0x10)] public SlotActionType ActionType; // 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
[FieldOffset(0x1C)] public uint CooldownMode; // to NumberArray idx slotBase + 7
Expand All @@ -31,4 +32,44 @@ public unsafe partial struct HotbarUIIntermediate {
[MemberFunction("E8 ?? ?? ?? ?? 48 8B 45 ?? 4C 8D 44 24")]
public partial HotbarUIIntermediate* Ctor();
}

// These values tend to shift up when new forays or jobs are added.
public enum SlotActionType {
None = 0,

Macro = 47,
Action = 48,
Emote = 49,
Item = 50,
InventoryItem = 51,
EventItem = 52,
KeyItem = 53,
Crystal = 54,
Marker = 55,
CraftAction = 56,
GeneralAction = 57,
BuddyAction = 58,
MainCommand = 59,
Companion = 60,
GearSet = 61,
PetAction = 62,
Mount = 63,
FieldMarker = 64,
Recipe = 65,
ChocoboRaceAbility = 66,
ChocoboRaceItem = 67,
Unknown23 = 68,
ExtraCommand = 69,
PvPQuickChat = 70,
PvPCombo = 71,
BgcArmyAction = 72,
Unknown28 = 73,
PerformanceInstrument = 74,
McGuffin = 75,
Ornament = 76,
LostFindsItem = 77,
Glasses = 78,
QuickPanel = 79,
Unknown36 = 80, // XBM related (AgentXBMContentsMainHUD), maybe BeastMasterAction
}
}
Loading