EmergencyCallManager

API reference for EmergencyCallManager in @erlcjs/core.

Manager responsible for fetching, caching, and updating active EmergencyCall structures.

Signature:

declare class EmergencyCallManager

#Constructors

Constructor

Modifiers

Description

(constructor)(server)

Creates an instance of EmergencyCallManager.

#Properties

Property

Modifiers

Type

Description

cache

Collection<number, EmergencyCall>

Collection cache of active emergency calls, keyed by call number.

#Methods

Method

Modifiers

Description

addCall(callData)

Adds a call to the emergency call cache with data from the webhook. Emits emergencyCallAdd events.

fetchAll()

Fetches all active emergency calls from the game server. Updates the emergency call cache.

removeCall(callData)

Removes a call from the emergency call cache with data from the webhook. Emits emergencyCallRemove events.

updateCache(rawCalls)

Re-synchronizes the cache with the raw emergency calls payload. Emits emergencyCallAdd, emergencyCallRemove, and emergencyCallUpdate events.