WoW:API IsPassiveSpell: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(upgraded deprecated template)
No edit summary
Line 55: Line 55:
:: Sword Specialization (Passive)
:: Sword Specialization (Passive)
:: The Human Spirit  (Racial Passive)
:: The Human Spirit  (Racial Passive)
This API call seems to be named IsPassiveSpell() instead. The parameters and return values are the same.

Revision as of 15:59, 1 November 2007

WoW API < IsPassiveSpell

IsSpellPassive -Documentation by Myrrion aka Paul2200-


if ( IsSpellPassive(spellID,bookType) )...


Returns whether the icon in your spellbook is a Passive ability (not necessarily a spell). (And actually noted as so in spellbook)


Arguments


(spellID, bookType)
spellID
The slot number in your spellbook. Each page has 12 slots and the numbering continues throughout your entire spellbook, ignoring empty slots.
bookType
Either BOOKTYPE_SPELL ("spell") or BOOKTYPE_PET ("pet"). "spell" is linked to your General Spellbook tab.

Returns


1 or nil
1
The "spell" is Passive
nil
The "spell" is not Passive

Example


message(IsSpellPassive(1,"spell"));
Result


message box with a "1" or empty, depending on whether or not the very first icon in your spellbook is passive.

Details


With my Human Paladin, here are the "spells" I found to be Passive:
Block (Passive)
Diplomacy (Racial Passive)
Dodge (Passive)
Mace Specialization (Passive)
Parry (Passive)
Sword Specialization (Passive)
The Human Spirit (Racial Passive)


This API call seems to be named IsPassiveSpell() instead. The parameters and return values are the same.