# C_StableInfo: 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_StableInfo

## Functions

### C_StableInfo.BuyStableSlot

```lua
C_StableInfo.BuyStableSlot()
```

### C_StableInfo.ClosePetStables

```lua
C_StableInfo.ClosePetStables()
```

### C_StableInfo.GetActivePetList

```lua
activePets = C_StableInfo.GetActivePetList()
```

Returns:
- `activePets`: PetInfo[]

### C_StableInfo.GetAvailablePetSpecInfos

```lua
petSpecInfos = C_StableInfo.GetAvailablePetSpecInfos()
```

Returns:
- `petSpecInfos`: PetSpecInfo[]

### C_StableInfo.GetNextStableSlotCost

```lua
cost = C_StableInfo.GetNextStableSlotCost()
```

Returns:
- `cost`: number

### C_StableInfo.GetNumActivePets

```lua
numActivePets = C_StableInfo.GetNumActivePets()
```

Returns:
- `numActivePets`: number

### C_StableInfo.GetNumStablePets

```lua
numStablePets = C_StableInfo.GetNumStablePets()
```

Returns:
- `numStablePets`: number

### C_StableInfo.GetNumStableSlots

```lua
numSlots = C_StableInfo.GetNumStableSlots()
```

Returns:
- `numSlots`: number

### C_StableInfo.GetStablePetFoodTypes

```lua
foodTypes = C_StableInfo.GetStablePetFoodTypes(index)
```

Arguments:
- `index`: luaIndex

Returns:
- `foodTypes`: string[]

### C_StableInfo.GetStablePetInfo

```lua
petInfo = C_StableInfo.GetStablePetInfo(index)
```

Arguments:
- `index`: luaIndex

Returns:
- `petInfo`: PetInfo, may be nil

### C_StableInfo.GetStabledPetList

```lua
stabledPets = C_StableInfo.GetStabledPetList()
```

Returns:
- `stabledPets`: PetInfo[]

### C_StableInfo.IsAtStableMaster

```lua
isAtStableMaster = C_StableInfo.IsAtStableMaster()
```

Returns:
- `isAtStableMaster`: bool

### C_StableInfo.IsBonusPetSlotAvailable

```lua
isAvailable = C_StableInfo.IsBonusPetSlotAvailable()
```

Returns:
- `isAvailable`: bool

### C_StableInfo.IsPetFavorite

```lua
isFavorite = C_StableInfo.IsPetFavorite(slot)
```

Arguments:
- `slot`: luaIndex

Returns:
- `isFavorite`: bool

### C_StableInfo.PickupStablePet

```lua
C_StableInfo.PickupStablePet(index)
```

Arguments:
- `index`: luaIndex

### C_StableInfo.SetPetFavorite

```lua
C_StableInfo.SetPetFavorite(slot, isFavorite)
```

Arguments:
- `slot`: luaIndex
- `isFavorite`: bool

### C_StableInfo.SetPetSlot

```lua
C_StableInfo.SetPetSlot(index, slot)
```

Arguments:
- `index`: luaIndex
- `slot`: luaIndex

## Events

### PET_INFO_UPDATE

No payload.

### PET_STABLE_CLOSED

No payload.

### PET_STABLE_FAVORITES_UPDATED

No payload.

### PET_STABLE_SHOW

No payload.

### PET_STABLE_UPDATE

No payload.

## Tables

### PetInfo (structure)

- `slotID`: number
- `icon`: fileID
- `name`: string
- `level`: number
- `familyName`: string
- `specialization`: string
- `type`: string
- `petAbilities`: number[]
- `specAbilities`: number[]
- `displayID`: number
- `isFavorite`: bool
- `isExotic`: bool
- `uiModelSceneID`: number, default 718
- `petNumber`: number
- `creatureID`: number
- `specID`: number
- `loyaltyLevel`: number
- `loyaltyName`: string
- `happinessLevel`: number
- `experience`: number
- `experienceNeeded`: number

### PetSpecInfo (structure)

- `specID`: number
- `specIndex`: luaIndex
- `specializationName`: string

---
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."
