Table of Contents

Class FactionUpdateBroadcastSerializer

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

Wire format for FactionUpdateBroadcast.

public static class FactionUpdateBroadcastSerializer
Inheritance
FactionUpdateBroadcastSerializer
Inherited Members

Remarks

Hand written for one field, and it is the most frequently paid template id in the game. TemplateID is a deterministic 32-bit hash (CachedScriptableObject.AddToCache), so it spans the whole signed range and FishNet's signed-packed form zigzags all but a sixteenth of it past 2^28 and spends FIVE bytes where unpacked spends exactly four. FactionController.FlushDirtyFactionUpdates sends every dirty faction to the owner AND to every observer of the character, and a single kill can dirty several factions at once — so that byte is paid per dirty faction per observer, continuously, during combat. NewValue stays packed: reputation is bounded and small, and packs to one or two bytes.

Methods

ReadFactionUpdateBroadcast(Reader)

public static FactionUpdateBroadcast ReadFactionUpdateBroadcast(this Reader reader)

Parameters

reader Reader

Returns

FactionUpdateBroadcast

WriteFactionUpdateBroadcast(Writer, FactionUpdateBroadcast)

public static void WriteFactionUpdateBroadcast(this Writer writer, FactionUpdateBroadcast value)

Parameters

writer Writer
value FactionUpdateBroadcast