Method Pet:AddSpell [-] [+]

Adds a spell to the Pet's spellbook.

enum ActiveStates : uint8
{
    ACT_PASSIVE  = 0x01,                                    // 0x01 - passive
    ACT_DISABLED = 0x81,                                    // 0x80 - castable
    ACT_ENABLED  = 0xC1,                                    // 0x40 | 0x80 - auto cast + castable
    ACT_COMMAND  = 0x07,                                    // 0x01 | 0x02 | 0x04
    ACT_REACTION = 0x06,                                    // 0x02 | 0x04
    ACT_DECIDE   = 0x00                                     // custom
};
enum PetSpellState
{
    PETSPELL_UNCHANGED          = 0,
    PETSPELL_CHANGED            = 1,
    PETSPELL_NEW                = 2,
    PETSPELL_REMOVED            = 3
};
enum PetSpellType
{
    PETSPELL_NORMAL             = 0,
    PETSPELL_FAMILY             = 1,
    PETSPELL_TALENT             = 2
};

Synopsis

success = Pet:AddSpell( spellId, active, state, type )

Arguments

number spellId

The spell ID to add.

Valid numbers: integers from 0 to 4,294,967,295.

ActiveStates active

The spell's active state by default is ACT_DECIDE.

PetSpellState state

The spell's state by default is PETSPELL_NEW.

PetSpellType type

The spell's type by default is PETSPELL_NORMAL.

Returns

boolean success

true if the spell was added successfully.

Generated on
©2016 - Eluna Lua Engine