test
This commit is contained in:
parent
0df70abad7
commit
0c14d78d8a
25 changed files with 1487 additions and 179 deletions
|
|
@ -1,6 +1,3 @@
|
|||
using System.Runtime.InteropServices;
|
||||
using Roboto.GameOffsets.Natives;
|
||||
|
||||
namespace Roboto.GameOffsets.Components;
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -14,76 +11,3 @@ public static class ActorOffsets
|
|||
public const int CooldownsVector = 0xB18;
|
||||
public const int DeployedEntitiesVector = 0xC10;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// An entry in the ActiveSkills vector: shared_ptr pair (0x10 bytes).
|
||||
/// Follow ActiveSkillPtr (first pointer) for skill details.
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct ActiveSkillEntry
|
||||
{
|
||||
public nint ActiveSkillPtr;
|
||||
public nint ControlBlockPtr; // shared_ptr control block, not used
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Details of an active skill. The shared_ptr in the ActiveSkills vector points
|
||||
/// 0x10 bytes into the object (past vtable + UseStage/CastType), so we read from
|
||||
/// ActiveSkillPtr - 0x10 and all offsets are relative to the true object base.
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Explicit, Pack = 1)]
|
||||
public struct ActiveSkillDetails
|
||||
{
|
||||
[FieldOffset(0x00)] public nint Vtable;
|
||||
[FieldOffset(0x08)] public int UseStage;
|
||||
[FieldOffset(0x0C)] public int CastType;
|
||||
[FieldOffset(0x20)] public uint UnknownIdAndEquipmentInfo;
|
||||
[FieldOffset(0x28)] public nint GrantedEffectsPerLevelDatRow;
|
||||
[FieldOffset(0x30)] public nint ActiveSkillsDatPtr;
|
||||
[FieldOffset(0x40)] public nint GrantedEffectStatSetsPerLevelDatRow;
|
||||
[FieldOffset(0xA8)] public int TotalUses;
|
||||
[FieldOffset(0xB8)] public int TotalCooldownTimeInMs;
|
||||
}
|
||||
|
||||
/// <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 ActiveSkillCooldown
|
||||
{
|
||||
[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;
|
||||
}
|
||||
|
||||
/// <summary>Vaal soul tracking.</summary>
|
||||
[StructLayout(LayoutKind.Explicit, Pack = 1)]
|
||||
public struct VaalSoulStructure
|
||||
{
|
||||
[FieldOffset(0x00)] public nint ActiveSkillsDatPtr;
|
||||
[FieldOffset(0x08)] public nint UselessPtr;
|
||||
[FieldOffset(0x10)] public int RequiredSouls;
|
||||
[FieldOffset(0x14)] public int CurrentSouls;
|
||||
|
||||
public readonly bool CannotBeUsed => CurrentSouls < RequiredSouls;
|
||||
}
|
||||
|
||||
/// <summary>A deployed entity (totem, mine, etc.).</summary>
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct DeployedEntityStructure
|
||||
{
|
||||
public int EntityId;
|
||||
public int ActiveSkillsDatId;
|
||||
public int DeployedObjectType;
|
||||
public int PAD_0x014;
|
||||
public int Counter;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue