SpellBook
Information about spells
Fields:
Count number
The number of spells in this spell book
KnownSpellsIds number[]
A list of known spell ids
Events:
Methods:
GetPropertyKeys() : string[]
Returns a list of strings of all public property / field names. Useful for reflection on UserData in lua scripts
GetSelfBuffs(skillModifier?: number = 5, force?: boolean = nil, minDurationMilliseconds?: number = 300000) : Spell[]
Get a list of all self buff spells that would benefit your character.
Name | Type | Default | Summary |
skillModifier | number | 5 | Skill modifier to use. This number is added to your current skill level when checking if you have the required skill to cast a spell |
force | boolean | false | If true, will ignore current character enchantments and return a full list of wanted buffs. |
minDurationMilliseconds | number | 300000 | Minimum duration left on an enchantment for it to be considered still active, and excluded from this list. |
HasSkillToCastSpell(spellId: number, spellDifficultyModifier?: number = 20) : boolean
Checks if the current character has the skill required to cast the specified spell successfully.
Name | Type | Default | Summary |
spellId | number | The id of the spell to check | |
spellDifficultyModifier | number | 20 | The number of skill points above the spell's difficulty that you must have in order to cast |
IsKnown(spellId: number) : boolean
Check if the specified spell id is known by your character
Name | Type | Default | Summary |
spellId | number | The spell id to check |