WoW:API IsPassiveSpell: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
 
m (Forgot to change second argument)
Line 3: Line 3:
<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->
<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->


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


<!-- Describe the purpose of the function, though exhausting detail can be saved for a later section -->
<!-- Describe the purpose of the function, though exhausting detail can be saved for a later section -->
Line 14: Line 14:
<!-- List each argument, together with its type -->
<!-- List each argument, together with its type -->


:(spellID, spellbooktabnum??)
:(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.
:;spellID : The slot number in your spellbook. Each page has 12 slots and the numbering continues throughout your entire spellbook, ignoring empty slots.
:;spellbooktabnum?? : Not sure, had no effect whatsoever on results
:;bookType : Either '''BOOKTYPE_SPELL''' ("spell") or '''BOOKTYPE_PET''' ("pet"). "spell" is linked to your General Spellbook tab.


----
----
Line 33: Line 33:
<!-- If it helps, include an example here, though it's not required if the usage is self-explanatory -->
<!-- If it helps, include an example here, though it's not required if the usage is self-explanatory -->


  message(GetSpellTexture(1,1234567890));
  message(IsSpellPassive(1,"spell"));


;''Result''
;''Result''
Line 40: Line 40:


  message box with a "1" or empty, depending on whether or not the very first icon in your spellbook is passive.
  message box with a "1" or empty, depending on whether or not the very first icon in your spellbook is passive.
Note: The second number actually has no significance on the output.
(1,1) is the first slot and so is (1,92183098).
(Although, it may be used ONLY if you have pet spells..?)


----
----

Revision as of 16:01, 28 March 2005

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)

Template:WoW API