Table of Contents

Struct AttributeReconcileEntry

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

A single non-resource character attribute entry for reconcile serialization. Mirrors BuffReconcileEntry / CooldownReconcileEntry index-delta compression so unchanged attributes contribute zero network bytes.

Resource attributes (HP/MP/Stamina) are NOT carried by this entry — they ride CharacterAttributeResourceState on the reconcile payload because they also need CurrentValue + RegenTickAccum state that base attributes do not have.

Only Value (authoritative base) and ExternalModifier (sum of buff / equipment / region contributions) are reconciled. FormulaModifier is intentionally recomputed locally via the dependency graph (CharacterAttribute.ApplyChildren): replicating it would (a) cost bandwidth for a derived value and (b) potentially overwrite a more up-to-date local computation.

public struct AttributeReconcileEntry : IEquatable<AttributeReconcileEntry>
Implements
Inherited Members

Fields

ExternalModifier

Authoritative external modifier (sum of buff / equip / region contributions).

public int ExternalModifier

Field Value

int

TemplateID

The attribute template ID.

public int TemplateID

Field Value

int

Value

Authoritative base value (pre-modifier).

public int Value

Field Value

int

Methods

Equals(AttributeReconcileEntry)

public bool Equals(AttributeReconcileEntry other)

Parameters

other AttributeReconcileEntry

Returns

bool

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ReadArrayDelta(Reader, AttributeReconcileEntry[])

Reads an attribute array from the delta stream. High header bit = index-delta over prev, otherwise full array.

public static AttributeReconcileEntry[] ReadArrayDelta(Reader reader, AttributeReconcileEntry[] prev)

Parameters

reader Reader
prev AttributeReconcileEntry[]

Returns

AttributeReconcileEntry[]

ReadFrom(Reader)

Reads a single entry's fields from the network reader.

public static AttributeReconcileEntry ReadFrom(Reader reader)

Parameters

reader Reader

Returns

AttributeReconcileEntry

WriteArrayDelta(Writer, AttributeReconcileEntry[], AttributeReconcileEntry[], DeltaSerializerOption)

Compares and writes attribute arrays using index-delta compression. The wire header is a packed 16-bit value: high bit = delta mode, low 15 bits = entry count.

public static bool WriteArrayDelta(Writer writer, AttributeReconcileEntry[] prev, AttributeReconcileEntry[] next, DeltaSerializerOption option)

Parameters

writer Writer
prev AttributeReconcileEntry[]
next AttributeReconcileEntry[]
option DeltaSerializerOption

Returns

bool

Remarks

Null / empty equivalence: both null and empty arrays serialize as count == 0 on the wire, and ReadArrayDelta(Reader, AttributeReconcileEntry[]) returns null for both.

Stable ordering required: producers MUST sort entries by TemplateID ascending so index-delta comparisons remain meaningful across ticks.

WriteTo(Writer)

Writes a single entry's fields to the network writer.

public void WriteTo(Writer writer)

Parameters

writer Writer