Table of Contents

Method ProcessEvent

Namespace
Anvil.API.Events
Assembly
NWN.Anvil.dll

ProcessEvent<TEvent>(EventCallbackType, TEvent?, bool)

Processes event callbacks, optionally within the NWScript VM context.

protected static TEvent? ProcessEvent<TEvent>(EventCallbackType eventType, TEvent? eventData, bool executeInScriptContext = true) where TEvent : class, IEvent

Parameters

eventType EventCallbackType

The callback phase.

eventData TEvent

The event payload instance; ignored when null.

executeInScriptContext bool

If true (default), executes the event handlers within a new NWScript VM context, with Context as OBJECT_SELF.

Returns

TEvent

The original event payload (or null when input was null).

Type Parameters

TEvent

The event payload type.