Table of Contents

Struct EquipmentReconcileEntry

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

Lightweight reconcile entry for a single equipped item slot. Only filled slots are serialized — empty slots are omitted.

public struct EquipmentReconcileEntry : IEquatable<EquipmentReconcileEntry>
Implements
Inherited Members

Fields

ItemID

The item's identity — its character_item row id, and the same value the attribute ledger keys its contribution by.

public long ItemID

Field Value

long

Remarks

This used to be called InstanceID and carried a number that could not identify an item: rows were keyed (character_id, slot) across three tables with three identity sequences, so it changed when the item moved and collided across containers. The owner's reconcile could therefore not match a runtime item to its entry, and materialised a clone into the slot while the original stayed in the inventory. One table, one identity, and the match works.

Zero for an item the database has not written yet. EquipmentController treats that as "cannot be matched" rather than as a value.

MaxEntries

Maximum number of equipment entries per reconcile payload.

public const int MaxEntries = 64

Field Value

int

Seed

Item generation seed (0 if not generated).

public int Seed

Field Value

int

Slot

Equipment slot index (byte cast of ItemSlot).

public byte Slot

Field Value

byte

TemplateID

Item template ID (0 = empty slot, omitted from reconcile).

public int TemplateID

Field Value

int

Methods

Equals(EquipmentReconcileEntry)

Returns true if this entry matches the other entry on all fields.

public bool Equals(EquipmentReconcileEntry other)

Parameters

other EquipmentReconcileEntry

The other entry to compare.

Returns

bool

True if all fields match.

Equals(object)

Returns true if obj is an EquipmentReconcileEntry with matching fields.

public override bool Equals(object obj)

Parameters

obj object

The object to compare.

Returns

bool

True if obj is an identical EquipmentReconcileEntry.

GetHashCode()

Returns a hash code combining all fields for use in dictionaries and sets.

public override int GetHashCode()

Returns

int

Hash code for this entry.

ReadArrayDelta(Reader, EquipmentReconcileEntry[])

Reads a delta-encoded array of reconcile entries previously written by WriteArrayDelta(Writer, EquipmentReconcileEntry[], EquipmentReconcileEntry[], DeltaSerializerOption). Handles both full-array and index-delta formats based on the header flag.

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

Parameters

reader Reader

Reader to deserialize from.

prev EquipmentReconcileEntry[]

Previous reconcile snapshot to base deltas on, or null.

Returns

EquipmentReconcileEntry[]

Reconstructed reconcile array, or null if empty.

ReadFrom(Reader)

Reads a single entry from a FishNet Reader.

public static EquipmentReconcileEntry ReadFrom(Reader reader)

Parameters

reader Reader

The Reader to read from.

Returns

EquipmentReconcileEntry

The deserialized EquipmentReconcileEntry.

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

Delta-encodes an array of reconcile entries by comparing against a previous snapshot. Writes a full array when lengths differ or force-write is requested; writes index-delta when lengths match. Returns true if any data was written.

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

Parameters

writer Writer

Writer to serialize to.

prev EquipmentReconcileEntry[]

Previous reconcile snapshot, or null.

next EquipmentReconcileEntry[]

Current reconcile snapshot, or null.

option DeltaSerializerOption

Delta serializer option (Unset = auto, otherwise force).

Returns

bool

True if data was written; false if unchanged.

WriteTo(Writer, EquipmentReconcileEntry)

Writes a single entry to a FishNet Writer.

public static void WriteTo(Writer writer, EquipmentReconcileEntry entry)

Parameters

writer Writer

The Writer to write to.

entry EquipmentReconcileEntry

The entry to serialize.