IGameEventAccessor
Interface IGameEventAccessor
Namespace: SwiftlyS2.Shared.GameEvents
Assembly: SwiftlyS2.CS2.dll
A generic accessor to native IGameEvent.
public interface IGameEventAccessor : INativeHandleImplements
Properties
DontBroadcast
When true, the event will not be broadcast to clients.
bool DontBroadcast { get; set; }Methods
GetBool(string)
Gets a boolean field from the event payload.
bool GetBool(string key)- key string — Field name.
- bool — Boolean value.
GetEntity<K>(string)
Gets an entity reference from the event payload.
K GetEntity<K>(string key) where K : CEntityInstance- key string — Field name.
- K — Entity instance.
- K — Entity type derived from SwiftlyS2.Shared.SchemaDefinitions.CEntityInstance.
GetEntityIndex(string)
Gets an entity index field from the event payload.
int GetEntityIndex(string key)- key string — Field name.
- int — Entity index.
GetFloat(string)
Gets a floating-point field from the event payload.
float GetFloat(string key)- key string — Field name.
- float — Float value.
GetInt32(string)
Gets an integer field from the event payload.
int GetInt32(string key)- key string — Field name.
- int — Integer value.
GetPawnEntityIndex(string)
Gets the pawn entity index referenced by the given field.
int GetPawnEntityIndex(string key)- key string — Field name.
- int — Pawn entity index.
GetPlayer(string)
Gets the player referenced by the given field.
IPlayer GetPlayer(string key)- key string — Field name.
- IPlayer — Player.
GetPlayerController(string)
Gets the player controller referenced by the given field.
CCSPlayerController GetPlayerController(string key)- key string — Field name.
- CCSPlayerController — Player controller.
GetPlayerPawn(string)
Gets the player pawn referenced by the given field.
CCSPlayerPawn GetPlayerPawn(string key)- key string — Field name.
- CCSPlayerPawn — Player pawn.
GetPlayerSlot(string)
Gets a player slot field from the event payload.
int GetPlayerSlot(string key)- key string — Field name.
- int — Player slot.
GetPtr(string)
Gets a raw pointer value from the event payload.
nint GetPtr(string key)- key string — Field name.
- nint — Pointer value.
GetString(string)
Gets a string field from the event payload.
string GetString(string key)- key string — Field name.
- string — String value.
GetUInt64(string)
Gets an unsigned 64-bit integer field from the event payload.
ulong GetUInt64(string key)- key string — Field name.
- ulong — Unsigned 64-bit value.
IsLocal()
Indicates whether the event is local to this server/client.
bool IsLocal()- bool — True if local.
IsReliable()
Indicates whether the event is marked as reliable.
bool IsReliable()- bool — True if reliable.
SetBool(string, bool)
Sets a boolean field on the event payload.
void SetBool(string key, bool value)SetEntity<K>(string, K)
Sets an entity reference on the event payload.
void SetEntity<K>(string key, K value) where K : CEntityInstance- key string — Field name.
- value K — Entity instance.
- K — Entity type derived from SwiftlyS2.Shared.SchemaDefinitions.CEntityInstance.
SetEntityIndex(string, int)
Sets an entity index field on the event payload.
void SetEntityIndex(string key, int value)SetFloat(string, float)
Sets a floating-point field on the event payload.
void SetFloat(string key, float value)SetInt32(string, int)
Sets an integer field on the event payload.
void SetInt32(string key, int value)SetPlayerSlot(string, int)
Sets a player slot field on the event payload.
void SetPlayerSlot(string key, int value)SetPtr(string, nint)
Sets a raw pointer value on the event payload.
void SetPtr(string key, nint value)SetString(string, string)
Sets a string field on the event payload.
void SetString(string key, string value)SetUInt64(string, ulong)
Sets an unsigned 64-bit integer field on the event payload.
void SetUInt64(string key, ulong value)