class Spell (client-side)
Available since version: 0.3.2
This class represents in game spells that npc can cast, and all necessary information regarding their logic.
Properties
int keyNo
Represents the key number for the spell (unused by the game, initialized by default to 32565).
VisualFX& effect (read-only)
Represents the visual effect bound to specific spell.
VisualFX& controlWarnFX (read-only)
Represents the control warn visual effect bound to specific spell (unused by the game).
Vob& spellCaster (read-only)
Represents the spell caster that cast the spell.
Vob& spellTarget (read-only)
Represents the spell target vob for the spell.
float manaTimer
Represents the frame mana invest timer for the spell.
int manaInvested
Represents the invested mana for spell by the caster.
int level
Represents the invested spell level by the caster.
int status
Represents the current spell status. For more information see SpellStatus constants.
int id
Represents the current spell id.
int info
Represents the meta info for spell, game uses this to set parser index of npc instance for transformation spells.
bool enabled
Represents whether or not spell effect is visible.
bool enabled (read-only)
Represents whether or not spell effect is visible.
int timerEffect (read-only)
Represents timer effect for the spell (unused by the game).
bool canBeDeleted (read-only)
Represents whether or not spell can be deleted.
float up
Represents current up value for the spell, remmnants of the telekinesis logic (unused by the game).
float hoverY
Represents current hover Y value for the spell, remmnants of the telekinesis logic (unused by the game).
float hoverOld
Represents current hover old value for the spell, remmnants of the telekinesis logic (unused by the game).
float hoverDir
Represents current hover dir value for the spell, remmnants of the telekinesis logic (unused by the game).
int energy
Represents energy npc attribute for the spell, by default it's being set to mana attribute.
float manaInvestTime
Represents time for investing one mana point for the spell.
int damagePerLevel
Represents damage per level ratio for the spells that can be invested.
int damageType
Represents damage type bitfield flag used by the spell.
int type
Represents type of the spell (Good = 0, Neutral = 1, Bad = 2).
bool canTurnDuringInvest
Represents whether or not caster can turn during spell invest.
bool canTurnDuringInvest
Represents whether or not caster can change target during spell invest.
bool canTurnDuringInvest
Represents whether or not caster can change target during spell invest.
bool isMultiEffect (read-only)
Represents whether or not spell is multi effect.
int targetCollectAlgo
Represents target collect algorithm type id used by the spell.
int targetCollectType
Represents target collect type bitfield used by the spell.
int targetCollectRange
Represents target collect range for the spell.
int targetCollectAzi
Represents target collect azimuth range (x angle in degrees) used by the spell.
int targetCollectElev
Represents target collect elevation range (y angle in degrees) used by the spell.
Methods
static isTargetTypeValid
This method will setup spell.
void isTargetTypeValid(userpointer vob, integer target_type)
Parameters:
userpointervob: the vob userpointer.integertarget_type: the target type. For more information see Target constants
static setup
This method will setup spell.
void setup(userpointer vobCaster, userpointer vobTarget, bool ignoreCastState = false)
Parameters:
userpointervobCaster: the caster vob userpointer.userpointervobTarget: the target vob for the visual effect.boolignoreCastState:trueif spell should ignore cast state, otherwisefalse.
static invest
This method handles mana invest process.
bool invest()
Returns bool:
static cast
This method casts spell.
bool cast()
Returns bool:
static stop
This method stop's spell.
int stop()
Returns int:
static stop
This method kill's spell.
int stop()
Returns int:
static open
This method uses open visual effect method.
void open()
static close
This method uses close visual effect method.
void close()
static reset
This method uses reset visual effect method.
void reset()
static getName
This method return's spell name.
string getName()
Returns string:
static isValidTarget
This method will check if given target is valid.
void isValidTarget(userpointer vob)
Parameters:
userpointervob: vob userpointer.
static setReleaseStatus
This method calls SPELL_PROCESSMANA_RELEASE daedalus function.
void setReleaseStatus()
static castSpecificSpell
This method casts light and transformation spells.
bool castSpecificSpell()
Returns bool:
static endTimedEffect
This method end's transformation spells.
void endTimedEffect()
static createEffect
This method create's new effect for the spell.
void createEffect()
static initByScript
This method will initialize spell.
void initByScript(string instance)
Parameters:
stringinstance: spell instance from daedalus scripts with "SPELL_" prefix.
static getSpellInstanceName
This method will initialize spell.
void getSpellInstanceName(string instance)
Parameters:
stringinstance: spell instance from daedalus scripts with "SPELL_" prefix.
static callScriptInvestedMana
This method calls SPELL_PROCESSMANA daedalus function.
void callScriptInvestedMana()
Callbacks
No callbacks.