Method ProcessEvent
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
eventTypeEventCallbackTypeThe callback phase.
eventDataTEventThe event payload instance; ignored when null.
executeInScriptContextboolIf 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
TEventThe event payload type.