Interface IAbilityController
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
IsActivating
True if an ability is currently activating.
bool IsActivating { get; }
Property Value
OnAbilityActivateTriggers
Triggers invoked on the server when an ability activation begins (non-replay).
List<Trigger> OnAbilityActivateTriggers { get; }
Property Value
OnAbilityCompleteTriggers
Triggers invoked on the server when an ability activation completes (non-replay).
List<Trigger> OnAbilityCompleteTriggers { get; }
Property Value
RemainingActivationTime
The remaining activation time for the current ability, or 0 if no ability is active.
float RemainingActivationTime { get; }
Property Value
Methods
Activate(long, bool)
Queues an ability for activation on this peer's next replicate input.
bool Activate(long referenceID, bool isHeld)
Parameters
Returns
- bool
True when the ability was queued. False when the pre-filter refused it or another activation, queued ability or interrupt is already pending.
Remarks
Queued, not activated: the authoritative decision is made inside the replicate. The return value is the caller's only signal that anything was queued at all — a server-side brain that arms its attack pacing on a refused call waits out a cooldown for an attack it never made, with nothing in the logs to say so.
ActivateConsumable(Item)
Queues a consumable item for activation through the replicate pipeline.
void ActivateConsumable(Item item)
Parameters
itemItemThe consumable item to activate.
CanManipulate()
Returns true if manipulation is allowed.
bool CanManipulate()
Returns
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
Interrupt(ICharacter)
Interrupts the current ability, optionally specifying the attacker.
void Interrupt(ICharacter attacker)
Parameters
attackerICharacterThe 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
abilityIDlongThe ability ID to check.
Returns
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
OnCanManipulate
Event triggered to check if manipulation is allowed.
event Func<bool> OnCanManipulate
Event Type
OnCancel
Event triggered when the current ability is cancelled.
event Action OnCancel
Event Type
OnConsumableItemChanged
Fired when a consumable changed the inventory row that held it. Arguments: the character, the item (identity and version intact even when destroyed), its slot, and whether it was destroyed. The server's persistence layer subscribes to this.
event Action<ICharacter, Item, int, bool> OnConsumableItemChanged
Event Type
- Action<ICharacter, Item, int, bool>
OnInterrupt
Event triggered when the current ability is interrupted.
event Action OnInterrupt
Event Type
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
OnReset
Event triggered to reset the UI.
event Action OnReset
Event Type
OnUpdate
Event triggered to update ability UI or state.
event Action<string, float, float> OnUpdate