Hobinbot@legacy41545296 (talk | contribs) (upgraded deprecated template) |
DerGhulbus14061@legacy41535029 (talk | contribs) (addded second parameter (see SecureTemplates.lua l. 228 for reference)) |
||
Line 4: | Line 4: | ||
Cast the corresponding pet skill. |
Cast the corresponding pet skill. |
||
− | CastPetAction(index); |
+ | CastPetAction(index, [unit]); |
---- |
---- |
||
Line 11: | Line 11: | ||
: (index) |
: (index) |
||
:; index : Number - The index of the pet skill for query. |
:; index : Number - The index of the pet skill for query. |
||
+ | |||
+ | : (unit) |
||
+ | :; unit : [[UnitId]] - Optional UnitId |
||
---- |
---- |
Revision as of 19:11, 6 February 2007
Automated updating of API pages at this location, to reflect patch changes, has ceased from 10.1.7 onwards. |
Cast the corresponding pet skill.
CastPetAction(index, [unit]);
- Arguments
- (index)
- index
- Number - The index of the pet skill for query.
- (unit)
- unit
- UnitId - Optional UnitId
- 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. Requires a button press.