using System.Runtime.InteropServices; using Roboto.GameOffsets.Natives; namespace Roboto.GameOffsets.Components; /// /// Cooldown state for a skill. Entries in Actor+0xB18 vector. /// From ExileCore2 GameOffsets.Objects.Components.ActiveSkillCooldown. /// [StructLayout(LayoutKind.Explicit, Pack = 1, Size = 0x48)] public struct ActorSkillCooldown { [FieldOffset(0x08)] public int ActiveSkillsDatId; [FieldOffset(0x10)] public StdVector CooldownsList; // 0x10-byte entries [FieldOffset(0x30)] public int MaxUses; [FieldOffset(0x34)] public int TotalCooldownTimeInMs; [FieldOffset(0x3C)] public uint UnknownIdAndEquipmentInfo; /// Number of active cooldown timer entries. public readonly int TotalActiveCooldowns => (int)CooldownsList.TotalElements(0x10); /// True if all uses are on cooldown. public readonly bool CannotBeUsed => TotalActiveCooldowns >= MaxUses; }