Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions methods/TrinityCore/SpellMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,28 @@ namespace LuaSpell
return 1;
}

/**
* Returns `true` if the [Spell] is passive, `false` otherwise.
*
* @return bool isPassive
*/
int IsPassive(Eluna* E, Spell* spell)
{
E->Push(spell->m_spellInfo->IsPassive());
return 1;
}

/**
* Returns `true` if the [Spell] is triggered, `false` otherwise.
*
* @return bool isTriggered
*/
int IsTriggered(Eluna* E, Spell* spell)
{
E->Push(spell->IsTriggered());
return 1;
}

/**
* Returns the [Unit] that casted the [Spell].
*
Expand Down Expand Up @@ -186,6 +208,8 @@ namespace LuaSpell

// Boolean
{ "IsAutoRepeat", &LuaSpell::IsAutoRepeat },
{ "IsPassive", &LuaSpell::IsPassive },
{ "IsTriggered", &LuaSpell::IsTriggered },

// Other
{ "Cancel", &LuaSpell::Cancel },
Expand Down