# C_PetInfo: World of Warcraft Forever API

Forever 1.60.1 (70959), Interface 16001, Lua 5.1, from Blizzard's own API documentation. Page: https://wowaddons.gg/forever-api/C_PetInfo

## Functions

### C_PetInfo.CanPetEatItem

```lua
canEat = C_PetInfo.CanPetEatItem(itemID)
```

Arguments:
- `itemID`: number

Returns:
- `canEat`: bool

### C_PetInfo.GetPetFoodTypes

```lua
foodTypes = C_PetInfo.GetPetFoodTypes()
```

Returns:
- `foodTypes`: string[]

### C_PetInfo.GetPetHappiness

```lua
happiness, damagePercentage, loyaltyRate = C_PetInfo.GetPetHappiness()
```

May return nothing.

Returns:
- `happiness`: number
- `damagePercentage`: number
- `loyaltyRate`: number

### C_PetInfo.GetPetLoyalty

```lua
loyaltyName = C_PetInfo.GetPetLoyalty()
```

May return nothing.

Returns:
- `loyaltyName`: string

### C_PetInfo.GetPetTalentTree

```lua
talentTreeName = C_PetInfo.GetPetTalentTree()
```

May return nothing.

Returns:
- `talentTreeName`: stringView

### C_PetInfo.GetPetTamersForMap

```lua
petTamers = C_PetInfo.GetPetTamersForMap(uiMapID)
```

Arguments:
- `uiMapID`: number

Returns:
- `petTamers`: PetTamerMapInfo[]

### C_PetInfo.GetPetTrainingPoints

```lua
totalPoints, usedPoints = C_PetInfo.GetPetTrainingPoints()
```

Returns:
- `totalPoints`: number
- `usedPoints`: number

### C_PetInfo.GetPetUIModelSceneID

```lua
modelSceneID = C_PetInfo.GetPetUIModelSceneID()
```

Returns:
- `modelSceneID`: number

### C_PetInfo.GetSpellForPetAction

```lua
spellID = C_PetInfo.GetSpellForPetAction(actionID)
```

Arguments:
- `actionID`: number

Returns:
- `spellID`: number, may be nil

### C_PetInfo.IsPetActionPassive

```lua
isPassive = C_PetInfo.IsPetActionPassive(actionID)
```

Arguments:
- `actionID`: number

Returns:
- `isPassive`: bool

### C_PetInfo.IsPetOrderMoveToPending

```lua
isPetOrderMoveToPending = C_PetInfo.IsPetOrderMoveToPending()
```

Returns:
- `isPetOrderMoveToPending`: bool

### C_PetInfo.PetAbandon

```lua
C_PetInfo.PetAbandon([petNumber])
```

Arguments:
- `petNumber`: number, may be nil

### C_PetInfo.PetAssistMode

```lua
C_PetInfo.PetAssistMode()
```

### C_PetInfo.PetRename

```lua
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

Payload, after the event's name:
- `delay`: number

### PET_FORCE_NAME_DECLENSION

Payload, after the event's name:
- `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

Payload, after the event's name:
- `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

---
Make an addon with your 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."
