Interface IAbilityKnowledgeController
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
KnownAbilityEvents
Set of known ability event IDs.
HashSet<int> KnownAbilityEvents { get; }
Property Value
KnownAbilityOnDestroyEvents
Set of known OnDestroy event IDs.
HashSet<int> KnownAbilityOnDestroyEvents { get; }
Property Value
KnownAbilityOnHitEvents
Set of known OnHit event IDs.
HashSet<int> KnownAbilityOnHitEvents { get; }
Property Value
KnownAbilityOnPreSpawnEvents
Set of known OnPreSpawn event IDs.
HashSet<int> KnownAbilityOnPreSpawnEvents { get; }
Property Value
KnownAbilityOnSpawnEvents
Set of known OnSpawn event IDs.
HashSet<int> KnownAbilityOnSpawnEvents { get; }
Property Value
KnownAbilityOnTickEvents
Set of known OnTick event IDs.
HashSet<int> KnownAbilityOnTickEvents { get; }
Property Value
KnownBaseAbilities
Set of known base ability IDs.
HashSet<int> KnownBaseAbilities { get; }
Property Value
Methods
KnowsAbility(int)
Returns true if the controller knows the specified base ability.
bool KnowsAbility(int abilityID)
Parameters
abilityIDintThe ability ID.
Returns
KnowsAbilityEvent(int)
Returns true if the controller knows the specified ability event.
bool KnowsAbilityEvent(int eventID)
Parameters
eventIDintThe event ID.
Returns
KnowsLearnedAbility(int)
Returns true if the controller knows the specified learned ability.
bool KnowsLearnedAbility(int templateID)
Parameters
templateIDintThe template ID.
Returns
LearnAbility(Ability, float)
Learns the specified ability, with optional cooldown.
void LearnAbility(Ability ability, float remainingCooldown = 0)
Parameters
LearnAbilityEvent(AbilityEvent)
Learns a single ability event without allocating a list.
bool LearnAbilityEvent(AbilityEvent abilityEvent)
Parameters
abilityEventAbilityEventThe ability event to learn.
Returns
LearnAbilityEvents(List<AbilityEvent>)
Learns the specified ability events.
bool LearnAbilityEvents(List<AbilityEvent> abilityEvents = null)
Parameters
abilityEventsList<AbilityEvent>The list of ability events.
Returns
LearnBaseAbilities(List<BaseAbilityTemplate>)
Learns the specified base abilities.
bool LearnBaseAbilities(List<BaseAbilityTemplate> abilityTemplates = null)
Parameters
abilityTemplatesList<BaseAbilityTemplate>The list of base ability templates.
Returns
LearnBaseAbility(BaseAbilityTemplate)
Learns a single base ability template without allocating a list.
bool LearnBaseAbility(BaseAbilityTemplate template)
Parameters
templateBaseAbilityTemplateThe base ability template to learn.
Returns
RemoveAbility(long)
Removes an ability by reference ID.
void RemoveAbility(long referenceID)
Parameters
referenceIDlongThe ability reference ID.
Events
OnAddAbility
Event triggered when a new ability is added.
event Action<Ability> OnAddAbility
Event Type
OnAddKnownAbility
Event triggered when a new base ability is added.
event Action<BaseAbilityTemplate> OnAddKnownAbility
Event Type
OnAddKnownAbilityEvent
Event triggered when a new ability event is added.
event Action<AbilityEvent> OnAddKnownAbilityEvent
Event Type
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
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.