refactor
This commit is contained in:
parent
4424f4c3a8
commit
0e7de0a5f3
281 changed files with 3188 additions and 611 deletions
34
src/Nexus.Core/PlayerState.cs
Normal file
34
src/Nexus.Core/PlayerState.cs
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
using System.Numerics;
|
||||
|
||||
namespace Nexus.Core;
|
||||
|
||||
public record PlayerState
|
||||
{
|
||||
public string? CharacterName { get; init; }
|
||||
public Vector2 Position { get; init; }
|
||||
public float Z { get; init; }
|
||||
public bool HasPosition { get; init; }
|
||||
|
||||
public int LifeCurrent { get; init; }
|
||||
public int LifeTotal { get; init; }
|
||||
public int ManaCurrent { get; init; }
|
||||
public int ManaTotal { get; init; }
|
||||
public int EsCurrent { get; init; }
|
||||
public int EsTotal { get; init; }
|
||||
|
||||
public float LifePercent => LifeTotal > 0 ? (float)LifeCurrent / LifeTotal * 100f : 0f;
|
||||
public float ManaPercent => ManaTotal > 0 ? (float)ManaCurrent / ManaTotal * 100f : 0f;
|
||||
public float EsPercent => EsTotal > 0 ? (float)EsCurrent / EsTotal * 100f : 0f;
|
||||
|
||||
// Action state (from Actor component)
|
||||
public short ActionId { get; init; }
|
||||
|
||||
// Flask state (populated by memory when available)
|
||||
public IReadOnlyList<FlaskState> Flasks { get; init; } = [];
|
||||
|
||||
// Active buffs (populated by memory when available)
|
||||
public IReadOnlyList<Buff> Buffs { get; init; } = [];
|
||||
|
||||
// Skill slots (populated by memory when available)
|
||||
public IReadOnlyList<SkillState> Skills { get; init; } = [];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue