Table of Contents

Interface ISpellCatalog

Namespace
AcDream.Plugin.Abstractions
Assembly
AcDream.Plugin.Abstractions.dll

The spells the character knows and the spell descriptions the client has loaded. Every list is empty before the server has sent the spellbook.

public interface ISpellCatalog

Properties

All

Every spell the loaded content table describes, not only the ones the character knows. Built on first use and cached by the host.

IReadOnlyList<PluginSpellInfo> All { get; }

Property Value

IReadOnlyList<PluginSpellInfo>

KnownAttackSpells

Known spells that attack a target directly, strongest first. Debuffs and self- or untargeted spells are not in this list.

IReadOnlyList<PluginSpellInfo> KnownAttackSpells { get; }

Property Value

IReadOnlyList<PluginSpellInfo>

KnownCombatSpells

Every known spell used against an enemy, attacks and debuffs alike, strongest first.

IReadOnlyList<PluginSpellInfo> KnownCombatSpells { get; }

Property Value

IReadOnlyList<PluginSpellInfo>

KnownSelfBuffs

Beneficial spells the character can cast on themselves, ordered by family with the strongest of each family first.

IReadOnlyList<PluginSpellInfo> KnownSelfBuffs { get; }

Property Value

IReadOnlyList<PluginSpellInfo>

Methods

GetCooldownRemaining(uint)

Seconds left before a spell's shared cooldown allows another cast, or 0 when it is not on cooldown.

double GetCooldownRemaining(uint cooldownId)

Parameters

cooldownId uint

Returns

double

IsKnown(uint)

Whether the character has learned this spell. The default implementation always answers false; read the known-spell lists instead.

bool IsKnown(uint spellId)

Parameters

spellId uint

Returns

bool

TryFindByName(string, bool, out PluginSpellInfo)

Finds a spell in All by name, ignoring case. An exact match wins; partialMatch falls back to the first name that contains the text.

bool TryFindByName(string name, bool partialMatch, out PluginSpellInfo spell)

Parameters

name string
partialMatch bool
spell PluginSpellInfo

Returns

bool

TryGet(uint, out PluginSpellInfo)

Looks up one spell's description. False when the loaded content describes no such spell.

bool TryGet(uint spellId, out PluginSpellInfo info)

Parameters

spellId uint
info PluginSpellInfo

Returns

bool

TryGetComponent(uint, out PluginSpellComponentInfo)

Looks up one spell component's description. False when the loaded content describes no such component, and on a host that carries no component descriptions.

bool TryGetComponent(uint componentId, out PluginSpellComponentInfo info)

Parameters

componentId uint
info PluginSpellComponentInfo

Returns

bool