Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
mNo edit summary
No edit summary
Line 33: Line 33:
   
 
: Cast the corresponding pet skill.
 
: Cast the corresponding pet skill.
  +
   
 
----
 
----
{{Template:WoW API}}
+
{{WoW API}}
[[Category:API Functions|CastPetAction]]
 
[[Category:API Pet Functions|CastPetAction]]
 

Revision as of 12:32, 4 January 2006

CastPetAction

Cast the corresponding pet skill.

CastPetAction(index);

Arguments
(index)
index
Number - The index of the pet skill for query.

Returns
nil

Example

cast by specified action name

 for i=1, NUM_PET_ACTION_SLOTS, 1 do
   local name, subtext, texture, isToken, isActive, autoCastAllowed, autoCastEnabled = GetPetActionInfo(i);
   if ( name == "Sacrifice" ) then
     CastPetAction(i);
   end
 end

Please notice that this exemple will only works if the sacrifice skill is named "Sacrifice" in the client locale.


Description
Cast the corresponding pet skill.



Template:WoW API