Struct EvaluationContext
- Namespace
- ElectricDrill.AstraRpgFramework.Conditions
- Assembly
- com.electricdrill.astra-rpg-framework.Runtime.dll
Lightweight value type passed to Evaluate(EvaluationContext) on every evaluation. Struct allocation keeps GC pressure at zero even under high tick frequency.
All fields are public for direct assignment via object-initializer syntax. Conditions must treat the context as read-only — mutations are silently discarded (pass-by-value semantics).
public struct EvaluationContext
Fields
EventPayload
Optional payload from the triggering event. null for tick-based or timer-based evaluation.
public object EventPayload
Field Value
- object
Holder
The entity that holds (owns) the effect (e.g., modifier or ability) being evaluated.
public EntityCore Holder
Field Value
Performer
The entity that applied/casted the effect (e.g., modifier or ability). May be null or equal to Holder for self-applied effects.
public EntityCore Performer
Field Value
Methods
TryGetPayload<T>(out T)
Attempts to cast EventPayload to T.
public bool TryGetPayload<T>(out T payload)
Parameters
payloadT
Returns
- bool
trueif the payload is a non-nullT; otherwisefalse.
Type Parameters
T