Hello there! We are conducting a survey to better understand the user experience in making a first edit. If you have ever made an edit on Gamepedia, please fill out the survey. Thank you!

API C_PetBattles.GetAbilityProcTurnIndex

From Wowpedia
Jump to: navigation, search

Returns the turn index for a specific ability and proc type.

turnIndex = C_PetBattles.GetAbilityProcTurnIndex(abilityID, procType)

Arguments

abilityID
Number - ID of the ability.
procType
Number - Index corresponding to a proc type.

Returns

turnIndex
Number - Number of rounds that the ability has been in play.

Details

Proc types are defined in FrameXML/Constants.lua. They are currently:

PET_BATTLE_EVENT_ON_APPLY = 0;
PET_BATTLE_EVENT_ON_DAMAGE_TAKEN = 1
PET_BATTLE_EVENT_ON_DAMAGE_DEALT = 2
PET_BATTLE_EVENT_ON_HEAL_TAKEN = 3
PET_BATTLE_EVENT_ON_HEAL_DEALT = 4
PET_BATTLE_EVENT_ON_AURA_REMOVED = 5
PET_BATTLE_EVENT_ON_ROUND_START = 6
PET_BATTLE_EVENT_ON_ROUND_END = 7
PET_BATTLE_EVENT_ON_TURN = 8
PET_BATTLE_EVENT_ON_ABILITY = 9
PET_BATTLE_EVENT_ON_SWAP_IN = 10
PET_BATTLE_EVENT_ON_SWAP_OUT = 11

Since there are only 12 possible values for procType, you can usually afford to just do a loop such as for procType = 0, 11 do instead of finding out the actual procType.

Patch history

Mists of Pandaria Patch 5.0.4 (2012-08-28): Added.

See also