skills working somewhat
This commit is contained in:
parent
a8c43ba7e2
commit
8a0e4bb481
22 changed files with 4227 additions and 161 deletions
|
|
@ -2,8 +2,15 @@ namespace Roboto.Core;
|
|||
|
||||
public record QuestProgress
|
||||
{
|
||||
/// <summary>QuestState.dat row index (POE2 int_vector mode). 0 if using legacy pointer mode.</summary>
|
||||
public int QuestStateIndex { get; init; }
|
||||
public string? QuestName { get; init; }
|
||||
/// <summary>Internal quest ID from dat row (e.g. "TreeOfSouls2", "IncursionQuest1_Act1").</summary>
|
||||
public string? InternalId { get; init; }
|
||||
/// <summary>Encounter state: 1=locked/not encountered, 2=available/started.</summary>
|
||||
public byte StateId { get; init; }
|
||||
/// <summary>True if this quest is the currently tracked/active quest in the UI.</summary>
|
||||
public bool IsTracked { get; init; }
|
||||
public string? StateText { get; init; }
|
||||
public string? ProgressText { get; init; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,12 +4,26 @@ public record SkillState
|
|||
{
|
||||
public int SlotIndex { get; init; }
|
||||
public ushort ScanCode { get; init; }
|
||||
public short SkillId { get; init; }
|
||||
public ushort SkillId { get; init; }
|
||||
public ushort Id2 { get; init; }
|
||||
public string? Name { get; init; }
|
||||
public string? InternalName { get; init; }
|
||||
public int UseStage { get; init; }
|
||||
public int CastType { get; init; }
|
||||
public int CooldownTimeMs { get; init; }
|
||||
public int SkillBarSlot { get; init; } = -1;
|
||||
public int ChargesCurrent { get; init; }
|
||||
public int ChargesMax { get; init; }
|
||||
public float CooldownRemaining { get; init; }
|
||||
public bool CanBeUsed { get; init; }
|
||||
public bool CanUse => CanBeUsed && CooldownRemaining <= 0;
|
||||
|
||||
// Derived properties
|
||||
public bool IsUsing => UseStage >= 2;
|
||||
public bool IsUsingOrCharging => UseStage >= 1;
|
||||
public bool IsChanneling => CastType == 10;
|
||||
public bool IsOnSkillBar => SkillBarSlot >= 0;
|
||||
public bool IsOnCooldown => ChargesMax > 0 && ChargesCurrent <= 0;
|
||||
public int RemainingUses => ChargesMax > 0 ? ChargesCurrent : 0;
|
||||
public float CooldownSeconds => CooldownTimeMs / 1000f;
|
||||
public bool CanUse => CanBeUsed && !IsOnCooldown;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue