Table of Contents

Struct CharacterAttributeResourceState

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

Represents the current state of a character's resource attributes (health, mana, stamina) and regeneration timer. Used for synchronizing resource values and regeneration progress between client and server.

public struct CharacterAttributeResourceState
Inherited Members

Fields

Breath

Seconds of breath the character has left under water. Its maximum is not carried: both peers derive it from the same attributes (CharacterAttributeController.MaxBreathSeconds).

public float Breath

Field Value

float

Health

The current health value of the character.

public float Health

Field Value

float

HealthConsumedTick

Tick health was last spent, or zero. With the two below, this is the regeneration lockout: replaying from a reconcile needs it to know whether a pulse in the replayed ticks fires.

public uint HealthConsumedTick

Field Value

uint

Mana

The current mana value of the character.

public float Mana

Field Value

float

ManaConsumedTick

Tick mana was last spent, or zero.

public uint ManaConsumedTick

Field Value

uint

MaxHealth

The current maximum health cap (final value) of the character.

public int MaxHealth

Field Value

int

MaxMana

The current maximum mana cap (final value) of the character.

public int MaxMana

Field Value

int

MaxStamina

The current maximum stamina cap (final value) of the character.

public int MaxStamina

Field Value

int

NextRegenTick

Absolute simulation tick at which the next resource-regeneration pulse should fire. Reconciled so both client and server advance regeneration from the same tick, eliminating the modulo-scheduling race that occurs when TickDelta changes at runtime (a new modulo interval can produce an immediate spurious pulse or a long gap). Zero means regeneration has not been scheduled yet (controller not yet started).

public uint NextRegenTick

Field Value

uint

Stamina

The current stamina value of the character.

public float Stamina

Field Value

float

StaminaConsumedTick

Tick stamina was last spent, or zero.

public uint StaminaConsumedTick

Field Value

uint