API C PetBattles.GetActivePet

Returns the index of the active pet for the specified owner in the pet battle. petIndex = C_PetBattles.GetActivePet(petOwner)

Arguments

 * petOwner: Number - 1: Current player, 2: Opponent

Returns

 * petIndex: Number - Returned values are always 1-3, but the order is based off of the initial order. Which pet is currently active is irrelevant to the index, if it was your 3rd pet when you entered battle, it will always be 3 on the index.