WoW:API HasPetSpells: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
m (Move page script moved page API HasPetSpells to API HasPetSpells without leaving a redirect)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<center>'''HasPetSpells''' ''-Documentation by AlexanderYoshi-''</center>
{{wowapi}}__NOTOC__
 
Returns how many spells/skills your pet has available.
Returns true if the player has pet spells.


  hasPetSpells, petToken = HasPetSpells();
  hasPetSpells, petToken = HasPetSpells();


----
== Parameters ==
;''Arguments''
=== Arguments ===


:''none''
:''none''


----
=== Returns ===
;''Returns''
 
:; numPetSpells, petToken
 
:;numPetSpells : Boolean - <tt>nil</tt> if the player has no pet spells, otherwise returns the number of pet spells.
:;petToken : String - The pet token, can be "DEMON" or "PET"
 
----
;''Example''
  local hasPetSpells, petToken = HasPetSpells();
 
;''Result''
true | false, "?"


----
:; numSpells : Number - The number of pet spells/skills. '''nil''' if you do not have a pet out.
;''Description''
:; petToken : String - Pet type, can be "DEMON" or "PET".


: Returns <tt>nil</tt> if the player has no pet spells, the number of pet spells otherwise.
== Description ==


----
Returns how many spells/skills the pet has available. This is ''not'' the number that are on the pet bar - it is the number of spells/skills in the pet's spellbook.
{{WoW API}}

Latest revision as of 04:46, 15 August 2023

WoW API < HasPetSpells

Returns how many spells/skills your pet has available.

hasPetSpells, petToken = HasPetSpells();

Parameters[edit]

Arguments[edit]

none

Returns[edit]

numSpells
Number - The number of pet spells/skills. nil if you do not have a pet out.
petToken
String - Pet type, can be "DEMON" or "PET".

Description[edit]

Returns how many spells/skills the pet has available. This is not the number that are on the pet bar - it is the number of spells/skills in the pet's spellbook.