24 lines
964 B
C#
24 lines
964 B
C#
using System.Runtime.InteropServices;
|
|
using Roboto.GameOffsets.Natives;
|
|
|
|
namespace Roboto.GameOffsets.Components;
|
|
|
|
/// <summary>
|
|
/// Cooldown state for a skill. Entries in Actor+0xB18 vector.
|
|
/// From ExileCore2 GameOffsets.Objects.Components.ActiveSkillCooldown.
|
|
/// </summary>
|
|
[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;
|
|
|
|
/// <summary>Number of active cooldown timer entries.</summary>
|
|
public readonly int TotalActiveCooldowns => (int)CooldownsList.TotalElements(0x10);
|
|
|
|
/// <summary>True if all uses are on cooldown.</summary>
|
|
public readonly bool CannotBeUsed => TotalActiveCooldowns >= MaxUses;
|
|
}
|