Table of Contents

Class AbilityApplyTargetAction

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

Action that applies an ability effect to a single targeted character.

[Serializable]
public class AbilityApplyTargetAction : BaseAction, IAction
Inheritance
AbilityApplyTargetAction
Implements
Inherited Members

Remarks

WIRING: OnSpawn, OnTick or OnDestroy. This runs the ability's whole OnHit set against one character, so it belongs on an event that is not itself part of that set — "the blast goes off on the target the cast resolved" without a projectile ever having to reach it. The choice is no longer only a comment: MayRunHitChain(bool) refuses an event that carries a collision payload, which is exactly the shape an OnHit dispatch has, so the recursion this note used to warn about cannot be authored at all.

It takes its target from the fan-out. The trigger's own TargetSelector (or this action's) is what names the character, as everywhere else — see the closing remark on AbilityDestroyEventData. An event with no target character is a no-op that says so, rather than inventing the caster as a victim.

Methods

Execute(ICharacter, EventData)

Executes the action, applying the ability to the targeted character.

public override void Execute(ICharacter initiator, EventData eventData)

Parameters

initiator ICharacter

The character initiating the action.

eventData EventData

Event data containing context for the action.