m
Move page script moved page API HasPetUI to WoW:API HasPetUI without leaving a redirect
m (Fixed category sort) |
m (Move page script moved page API HasPetUI to WoW:API HasPetUI without leaving a redirect) |
||
| (7 intermediate revisions by 7 users not shown) | |||
| Line 1: | Line 1: | ||
{{wowapi}} | |||
Returns <tt>1</tt> if the player has a pet User Interface. | |||
hasUI, isHunterPet = HasPetUI(); | |||
hasUI = HasPetUI(); | |||
---- | ---- | ||
| Line 13: | Line 12: | ||
;''Returns'' | ;''Returns'' | ||
:hasUI | :hasUI, isHunterPet | ||
:;hasUI : | :;hasUI :The number <tt>1</tt> if the player has a pet User Interface, <tt>nil</tt> if he does not. | ||
:;isHunterPet :The number <tt>1</tt> if the pet is a hunter pet, <tt>nil</tt> if it is not. | |||
---- | ---- | ||
| Line 20: | Line 20: | ||
if ( HasPetUI() ) then DoPetStuff(); end | if ( HasPetUI() ) then DoPetStuff(); end | ||
;'' | ;''Example'' | ||
local hasUI, isHunterPet = HasPetUI(); | |||
if hasUI then | |||
---- | if isHunterPet then | ||
DoHunterPetStuff(); -- For hunters | |||
else | |||
DoMinionStuff(); -- For Warlock minions | |||
end | |||
end | |||
---- | ---- | ||
;''Known Issues'' | |||
Does not work for Frost Mages' Water Elemental pets. Even with a Water Elemental out (and the Pet UI showing), HasPetUI() returns nil,nil | |||