Struct CharacterCastBroadcast
Server → observers. One character started or stopped an activation.
public struct CharacterCastBroadcast : IBroadcast
- Implements
-
IBroadcast
- Inherited Members
Remarks
What observers could see before this. Only the ability OBJECT: a projectile appeared
and flew, reproduced from AbilityActivatedBroadcast. An ability that spawns no world
object — a self-buff, a pet summon, anything without an object prefab — told observers
nothing at all, and a consumable told them nothing ever. There was no way to look at another
character and see that it was doing something.
This is sent from the activation state machine rather than from the spawn path, which is what makes it cover every activation there is, object or no object, ability or consumable.
Only what the receiver cannot already know. Duration and ability type are NOT sent:
both live on the template, templates are immutable and loaded identically on every peer,
and the receiver resolves the ability from the caster's own KnownAbilities. Sending
them would be paying, per cast per observer, for two numbers already in memory. An
observer-side animation hook reads the type from the same template, so adding one later
still does not change this message.
And two shapes, named by the first byte. A stop carries neither the tick nor the consumable flag, because its handler reads neither — see CharacterCastBroadcastSerializer, which lives beside the other two observer formats rather than here.
Fields
CasterObjectID
The casting character's network object id.
public int CasterObjectID
Field Value
IsConsumable
True when this is an item being used rather than an ability.
public bool IsConsumable
Field Value
ReferenceID
The ability INSTANCE id, or the item template id when IsConsumable.
public long ReferenceID
Field Value
Remarks
An instance id rather than a template id, for the same reason
AbilityActivatedBroadcast carries one: an observer holds the caster's
KnownAbilities — filled by the spawn payload and kept current by
AbilityLearnedObserverBroadcast — so it can resolve the instance and name the
crafted ability the player actually built, rather than the base template it was built
from. TryGetAbilityForVisuals is the same lookup the activation handler uses.
ServerTick
The server tick the activation started on.
public uint ServerTick
Field Value
Remarks
The message spends a network delay in flight, during which the cast has been running. The receiver measures that delay from this and starts the bar partway, rather than restarting it — which would leave every observed cast finishing late by one trip.
Started
True when the activation began; false when it ended, however it ended.
public bool Started