WoW:API IsPassiveSpell: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
 
m (Move page script moved page API IsPassiveSpell to API IsPassiveSpell without leaving a redirect)
 
(6 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<center>'''IsSpellPassive''' ''-Documentation by [[user:Author|Myrrion aka Paul2200]]-''</center>
{{wowapi}}
 
<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->
 
if ( IsSpellPassive(spellID,spellbooktabnum) )...
 
<!-- Describe the purpose of the function, though exhausting detail can be saved for a later section -->


Returns whether the icon in your spellbook is a Passive ability (not necessarily a spell). (And actually noted as so in spellbook)
Returns whether the icon in your spellbook is a Passive ability (not necessarily a spell). (And actually noted as so in spellbook)
isPassive = IsPassiveSpell(spellID, bookType);


----
==Arguments==
;''Arguments''
;spellID : Number: spellbook slot index, ascending from 1.
 
;bookType : Either '''BOOKTYPE_SPELL''' ("spell") or '''BOOKTYPE_PET''' ("pet"). "spell" is linked to your General Spellbook tab.
<!-- List each argument, together with its type -->
 
:(spellID, spellbooktabnum??)
:;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
 
----
;''Returns''
 
<!-- List each return value, together with its type -->
 
:1 or nil
 
:;1 : The "spell" is Passive
:;nil : The "spell" is not Passive
 
----
;''Example''


<!-- If it helps, include an example here, though it's not required if the usage is self-explanatory -->
==Returns==
 
;isPassive : Flag : 1 if the spell is passive, nil otherwise.
message(GetSpellTexture(1,1234567890));
 
;''Result''
 
<!-- If it helps, include example results here, though they are not required-->
 
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..?)
 
----
;''Details''
 
<!-- Details not appropriate for the main description can go here -->


==Details==
: With my Human Paladin, here are the "spells" I found to be Passive:
: With my Human Paladin, here are the "spells" I found to be Passive:
:: Block (Passive)
:: Block (Passive)
Line 58: Line 20:
:: Sword Specialization (Passive)
:: Sword Specialization (Passive)
:: The Human Spirit  (Racial Passive)
:: The Human Spirit  (Racial Passive)
----
{{Template:WoW API}}
<!-- Update the category to the appropriate subsection, and be sure to put the function name as the label for the category link. Multiple subcategories are okay if appropriate, please dont link functions to the API Functions category directly. -->
[[Category:API Functions|Empty Template]]

Latest revision as of 04:46, 15 August 2023

WoW API < IsPassiveSpell

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

isPassive = IsPassiveSpell(spellID, bookType);

Arguments[edit]

spellID
Number: spellbook slot index, ascending from 1.
bookType
Either BOOKTYPE_SPELL ("spell") or BOOKTYPE_PET ("pet"). "spell" is linked to your General Spellbook tab.

Returns[edit]

isPassive
Flag : 1 if the spell is passive, nil otherwise.

Details[edit]

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)