World of Warcraft Forever API · C_PetInfo.md, for your AI
C_PetInfo
14 functions, 12 events, 1 tables, as Blizzard documents them for Forever 1.60.1 (70959).
Making an addon with an AI? Tell it: Read https://wowaddons.gg/agents.md, then make me a World of Warcraft Forever addon that …, try it with me in the game, and publish it. It checks every call against this API before you try it in the game, then publishes it here. How it works.
Functions
C_PetInfo.CanPetEatItem
canEat = C_PetInfo.CanPetEatItem(itemID)
Arguments
itemID | number |
|---|
Returns
canEat | bool |
|---|
C_PetInfo.GetPetFoodTypes
foodTypes = C_PetInfo.GetPetFoodTypes()
Returns
foodTypes | string[] |
|---|
C_PetInfo.GetPetHappiness
happiness, damagePercentage, loyaltyRate = C_PetInfo.GetPetHappiness()
May return nothing.
Returns
happiness | number | |
|---|---|---|
damagePercentage | number | |
loyaltyRate | number |
C_PetInfo.GetPetLoyalty
loyaltyName = C_PetInfo.GetPetLoyalty()
May return nothing.
Returns
loyaltyName | string |
|---|
C_PetInfo.GetPetTalentTree
talentTreeName = C_PetInfo.GetPetTalentTree()
May return nothing.
Returns
talentTreeName | stringView |
|---|
C_PetInfo.GetPetTamersForMap
petTamers = C_PetInfo.GetPetTamersForMap(uiMapID)
Arguments
uiMapID | number |
|---|
Returns
petTamers | PetTamerMapInfo[] |
|---|
C_PetInfo.GetPetTrainingPoints
totalPoints, usedPoints = C_PetInfo.GetPetTrainingPoints()
Returns
totalPoints | number | |
|---|---|---|
usedPoints | number |
C_PetInfo.GetPetUIModelSceneID
modelSceneID = C_PetInfo.GetPetUIModelSceneID()
Returns
modelSceneID | number |
|---|
C_PetInfo.GetSpellForPetAction
spellID = C_PetInfo.GetSpellForPetAction(actionID)
Arguments
actionID | number |
|---|
Returns
spellID | number may be nil |
|---|
C_PetInfo.IsPetActionPassive
isPassive = C_PetInfo.IsPetActionPassive(actionID)
Arguments
actionID | number |
|---|
Returns
isPassive | bool |
|---|
C_PetInfo.IsPetOrderMoveToPending
isPetOrderMoveToPending = C_PetInfo.IsPetOrderMoveToPending()
Returns
isPetOrderMoveToPending | bool |
|---|
C_PetInfo.PetAbandon
C_PetInfo.PetAbandon([petNumber])
Arguments
petNumber | number may be nil |
|---|
C_PetInfo.PetAssistMode
C_PetInfo.PetAssistMode()
C_PetInfo.PetRename
C_PetInfo.PetRename(name, [petNumber], [declensions])
Arguments
name | cstring | |
|---|---|---|
petNumber | number may be nil | |
declensions | cstring[] may be nil |
Events
PET_ATTACK_START
No payload.
PET_ATTACK_STOP
No payload.
PET_BAR_HIDEGRID
No payload.
PET_BAR_SHOWGRID
No payload.
PET_BAR_UPDATE_COOLDOWN
No payload.
PET_DISMISS_START
delay | number |
|---|
PET_FORCE_NAME_DECLENSION
name | cstring | |
|---|---|---|
petNumber | number may be nil | |
declinedName1 | cstring may be nil | |
declinedName2 | cstring may be nil | |
declinedName3 | cstring may be nil | |
declinedName4 | cstring may be nil | |
declinedName5 | cstring may be nil |
PET_ORDER_MOVE_TO_PENDING_CHANGED
isPetOrderMoveToPending | bool |
|---|
PET_UI_CLOSE
No payload.
RAISED_AS_GHOUL
No payload.
UPDATE_POSSESS_BAR
No payload.
UPDATE_VEHICLE_ACTIONBAR
No payload.
Tables
PetTamerMapInfo structure
areaPoiID | number | |
|---|---|---|
position | vector2 | |
name | cstring | |
atlasName | string may be nil | |
textureIndex | number may be nil |