Table of Contents

Class AbilityDestroyEventData

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

Event data for an ability object's OnDestroy dispatch — the fourth ability event payload.

public class AbilityDestroyEventData : EventData
Inheritance
AbilityDestroyEventData
Inherited Members

Remarks

Why this exists. OnDestroy used to dispatch a bare EventData carrying only the caster and a tick. TryResolveFrom(EventData, out AbilityObject) reads the collision, spawn and tick payloads, so every object-scoped action wired to OnDestroy — AbilityApplyAreaAction, AbilityApplyHitscanAction, AbilityHitCountAction, AbilityForkHitAction, AbilityMoveTransformAction, AbilitySpawnMultiplyAction, AbilityApplyTargetAction — resolved nothing and returned having silently done nothing. That made the most ordinary shape in the genre, a projectile that detonates in an area when its lifetime runs out, impossible to author, and it failed quietly rather than warning.

The spatial origin is the OBJECT, not the caster. Target is set to the dying object's GameObject so a selector on an OnDestroy trigger centres on where the projectile ENDED. Falling back to the initiator, as an empty event does, would centre a detonation on the caster — the one place it certainly did not happen.

TargetCharacter is deliberately left null: an expiring object struck nobody, and an action that resolves a target strictly should decline rather than invent one. The per-candidate characters come from the trigger's own selector fan-out, as everywhere else.

Constructors

AbilityDestroyEventData(ICharacter, AbilityObject)

Builds the payload for one object's destroy dispatch.

public AbilityDestroyEventData(ICharacter initiator, AbilityObject abilityObject)

Parameters

initiator ICharacter

The caster, or the snapshot phantom that replaced it.

abilityObject AbilityObject

The object being destroyed.

Properties

AbilityObject

The object being destroyed. Still positioned and active while the events run.

public AbilityObject AbilityObject { get; }

Property Value

AbilityObject