Table of Contents

Class CharacterResourcesBroadcastSerializer

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

Wire format for CharacterResourcesBroadcast.

public static class CharacterResourcesBroadcastSerializer
Inheritance
CharacterResourcesBroadcastSerializer
Inherited Members

Remarks

Sequence, object id and the mask byte, then only the fields the mask names. Hand written because FishNet's generated serializer writes every field of a struct unconditionally, and the three maxima are unchanged for almost the whole of a character's life.

The mask is written BEFORE the values rather than backfilled, because the sender knows it before it writes anything — there is no equivalent here of the reconcile serializer's placeholder-and-insert, which exists only because that writer discovers its flags as it goes.

Methods

ReadCharacterResourcesBroadcast(Reader)

public static CharacterResourcesBroadcast ReadCharacterResourcesBroadcast(this Reader reader)

Parameters

reader Reader

Returns

CharacterResourcesBroadcast

Remarks

Fields the mask does not name are left at zero in the returned struct. They must never be applied — see Mask — and zero is deliberately not a usable value so a receiver that forgets the mask fails loudly rather than quietly emptying somebody's bar.

WriteCharacterResourcesBroadcast(Writer, CharacterResourcesBroadcast)

Writes a CharacterResourcesBroadcast. Discovered by FishNet's codegen by name.

public static void WriteCharacterResourcesBroadcast(this Writer writer, CharacterResourcesBroadcast value)

Parameters

writer Writer
value CharacterResourcesBroadcast