Table of Contents

Interface IAbilityController

Namespace
FishMMO.Shared.Core
Assembly
FishMMO.Shared.dll

Interface for ability controllers, managing ability activation and state. Inherits from IAbilityKnowledgeController for known ability/event management. Consumers that only need to query or modify known abilities should depend on IAbilityKnowledgeController instead for better interface segregation.

public interface IAbilityController : IAbilityKnowledgeController, ICharacterBehaviour
Inherited Members

Properties

AbilityQueued

True if an ability is queued for activation.

bool AbilityQueued { get; }

Property Value

bool

IsActivating

True if an ability is currently activating.

bool IsActivating { get; }

Property Value

bool

OnAbilityActivateTriggers

Triggers invoked on the server when an ability activation begins (non-replay).

List<Trigger> OnAbilityActivateTriggers { get; }

Property Value

List<Trigger>

OnAbilityCompleteTriggers

Triggers invoked on the server when an ability activation completes (non-replay).

List<Trigger> OnAbilityCompleteTriggers { get; }

Property Value

List<Trigger>

RemainingActivationTime

The remaining activation time for the current ability, or 0 if no ability is active.

float RemainingActivationTime { get; }

Property Value

float

Methods

Activate(long, bool)

Activates an ability by reference ID and held state.

void Activate(long referenceID, bool isHeld)

Parameters

referenceID long

The ability reference ID.

isHeld bool

Whether the activation key is held.

ActivateConsumable(Item)

Queues a consumable item for activation through the replicate pipeline.

void ActivateConsumable(Item item)

Parameters

item Item

The consumable item to activate.

CanManipulate()

Returns true if manipulation is allowed.

bool CanManipulate()

Returns

bool

Cancel()

Cancels the current ability immediately, clearing all activation state. Safe to call from any context; uses default internal parameters.

void Cancel()

GetCurrentAbilityType()

Gets the current ability type.

AbilityType GetCurrentAbilityType()

Returns

AbilityType

Interrupt(ICharacter)

Interrupts the current ability, optionally specifying the attacker.

void Interrupt(ICharacter attacker)

Parameters

attacker ICharacter

The character causing the interruption.

Release()

Releases the held state for the current ability. For charged abilities this triggers the release (fire). For channeled abilities this stops the channel early.

void Release()

RequiresHeld(long)

Returns true if the ability requires held input (channeled or charged). AI should pass the result as the isHeld parameter when calling Activate().

bool RequiresHeld(long abilityID)

Parameters

abilityID long

The ability ID to check.

Returns

bool

Events

OnAbilityDenied

Fired when the server denies an ability the client already started predicting. Subscribers should show an "interrupted" flash, restore predicted resources, etc.

event Action<long> OnAbilityDenied

Event Type

Action<long>

OnCanManipulate

Event triggered to check if manipulation is allowed.

event Func<bool> OnCanManipulate

Event Type

Func<bool>

OnCancel

Event triggered when the current ability is cancelled.

event Action OnCancel

Event Type

Action

OnInterrupt

Event triggered when the current ability is interrupted.

event Action OnInterrupt

Event Type

Action

OnPredictionMismatch

Fired when predicted ability objects are destroyed due to state mismatch. Provides the reconcile tick. For 1-2 tick mismatches, replay corrects invisibly.

event Action<uint> OnPredictionMismatch

Event Type

Action<uint>

OnReset

Event triggered to reset the UI.

event Action OnReset

Event Type

Action

OnUpdate

Event triggered to update ability UI or state.

event Action<string, float, float> OnUpdate

Event Type

Action<string, float, float>