Returns information about a pet action


See also Pet functions, Action functions.

Signature:

name, subtext, texture, isToken, isActive, autoCastAllowed, autoCastEnabled = GetPetActionInfo(index)

Arguments:

  • index - Index of a pet action button (between 1 and NUM_PET_ACTION_SLOTS) (number)

Returns:

  • name - Localized name of the action, or a token which can be used to get the localized name of a standard action (string)
  • subtext - Secondary text for the action (generally a spell rank; e.g. "Rank 8") (string)
  • texture - Path to an icon texture for the action, or a token which can be used to get the texture path of a standard action (string)
  • isToken - 1 if the returned name and texture are tokens for standard actions, which should be used to look up actual values (e.g. PET_ACTION_ATTACK, PET_ATTACK_TEXTURE); nil if name and texture can be displayed as-is (1nil)
  • isActive - 1 if the action is currently active; otherwise nil. (Indicates which state is chosen for the follow/stay and aggressive/defensive/passive switches.) (1nil)
  • autoCastAllowed - 1 if automatic casting is allowed for the action; otherwise nil (1nil)
  • autoCastEnabled - 1 if automatic casting is currently turned on for the action; otherwise nil (1nil)