Table of Contents

Interface IAbilityKnowledgeController

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

Interface for ability knowledge management — tracking known abilities, base abilities, and ability events. Separated from IAbilityController to satisfy ISP: consumers that only need to query or modify known abilities can depend on this smaller contract instead of the full activation interface.

public interface IAbilityKnowledgeController : ICharacterBehaviour
Inherited Members

Properties

KnownAbilities

Dictionary of known abilities by ID.

SortedDictionary<long, Ability> KnownAbilities { get; }

Property Value

SortedDictionary<long, Ability>

KnownAbilityEvents

Set of known ability event IDs.

HashSet<int> KnownAbilityEvents { get; }

Property Value

HashSet<int>

KnownAbilityOnDestroyEvents

Set of known OnDestroy event IDs.

HashSet<int> KnownAbilityOnDestroyEvents { get; }

Property Value

HashSet<int>

KnownAbilityOnHitEvents

Set of known OnHit event IDs.

HashSet<int> KnownAbilityOnHitEvents { get; }

Property Value

HashSet<int>

KnownAbilityOnPreSpawnEvents

Set of known OnPreSpawn event IDs.

HashSet<int> KnownAbilityOnPreSpawnEvents { get; }

Property Value

HashSet<int>

KnownAbilityOnSpawnEvents

Set of known OnSpawn event IDs.

HashSet<int> KnownAbilityOnSpawnEvents { get; }

Property Value

HashSet<int>

KnownAbilityOnTickEvents

Set of known OnTick event IDs.

HashSet<int> KnownAbilityOnTickEvents { get; }

Property Value

HashSet<int>

KnownBaseAbilities

Set of known base ability IDs.

HashSet<int> KnownBaseAbilities { get; }

Property Value

HashSet<int>

Methods

KnowsAbility(int)

Returns true if the controller knows the specified base ability.

bool KnowsAbility(int abilityID)

Parameters

abilityID int

The ability ID.

Returns

bool

KnowsAbilityEvent(int)

Returns true if the controller knows the specified ability event.

bool KnowsAbilityEvent(int eventID)

Parameters

eventID int

The event ID.

Returns

bool

KnowsLearnedAbility(int)

Returns true if the controller knows the specified learned ability.

bool KnowsLearnedAbility(int templateID)

Parameters

templateID int

The template ID.

Returns

bool

LearnAbility(Ability, float)

Learns the specified ability, with optional cooldown.

void LearnAbility(Ability ability, float remainingCooldown = 0)

Parameters

ability Ability

The ability to learn.

remainingCooldown float

The remaining cooldown time.

LearnAbilityEvent(AbilityEvent)

Learns a single ability event without allocating a list.

bool LearnAbilityEvent(AbilityEvent abilityEvent)

Parameters

abilityEvent AbilityEvent

The ability event to learn.

Returns

bool

LearnAbilityEvents(List<AbilityEvent>)

Learns the specified ability events.

bool LearnAbilityEvents(List<AbilityEvent> abilityEvents = null)

Parameters

abilityEvents List<AbilityEvent>

The list of ability events.

Returns

bool

LearnBaseAbilities(List<BaseAbilityTemplate>)

Learns the specified base abilities.

bool LearnBaseAbilities(List<BaseAbilityTemplate> abilityTemplates = null)

Parameters

abilityTemplates List<BaseAbilityTemplate>

The list of base ability templates.

Returns

bool

LearnBaseAbility(BaseAbilityTemplate)

Learns a single base ability template without allocating a list.

bool LearnBaseAbility(BaseAbilityTemplate template)

Parameters

template BaseAbilityTemplate

The base ability template to learn.

Returns

bool

RemoveAbility(long)

Removes an ability by reference ID.

void RemoveAbility(long referenceID)

Parameters

referenceID long

The ability reference ID.

Events

OnAddAbility

Event triggered when a new ability is added.

event Action<Ability> OnAddAbility

Event Type

Action<Ability>

OnAddKnownAbility

Event triggered when a new base ability is added.

event Action<BaseAbilityTemplate> OnAddKnownAbility

Event Type

Action<BaseAbilityTemplate>

OnAddKnownAbilityEvent

Event triggered when a new ability event is added.

event Action<AbilityEvent> OnAddKnownAbilityEvent

Event Type

Action<AbilityEvent>

OnRemoveAbility

Event triggered when a crafted ability is removed (forgotten / re-crafted). Carries the ability's reference ID; the instance is already gone by then.

event Action<long> OnRemoveAbility

Event Type

Action<long>

Remarks

The add half of this pair has always existed. Without the remove half every subscriber had to poll KnownAbilities to notice a forgotten ability — which is exactly what the hotkey bar was doing, on every frame, for all twelve slots.