# C_PlayerChoice: 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_PlayerChoice

## Functions

### C_PlayerChoice.GetCurrentPlayerChoiceInfo

```lua
choiceInfo = C_PlayerChoice.GetCurrentPlayerChoiceInfo()
```

May return nothing.

Returns:
- `choiceInfo`: PlayerChoiceInfo

### C_PlayerChoice.GetNumRerolls

```lua
numRerolls = C_PlayerChoice.GetNumRerolls()
```

Returns:
- `numRerolls`: number

### C_PlayerChoice.GetRemainingTime

```lua
remainingTime = C_PlayerChoice.GetRemainingTime()
```

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

### C_PlayerChoice.IsWaitingForPlayerChoiceResponse

```lua
isWaitingForResponse = C_PlayerChoice.IsWaitingForPlayerChoiceResponse()
```

Returns:
- `isWaitingForResponse`: bool

### C_PlayerChoice.OnUIClosed

```lua
C_PlayerChoice.OnUIClosed()
```

### C_PlayerChoice.RequestRerollPlayerChoice

```lua
C_PlayerChoice.RequestRerollPlayerChoice()
```

### C_PlayerChoice.SendPlayerChoiceResponse

```lua
C_PlayerChoice.SendPlayerChoiceResponse(responseID)
```

Arguments:
- `responseID`: number

## Events

### PLAYER_CHOICE_CLOSE

No payload.

### PLAYER_CHOICE_UPDATE

No payload.

## Tables

### Enum.PlayerChoiceRarity (enumeration)

- `Common` = 0
- `Uncommon` = 1
- `Rare` = 2
- `Epic` = 3

### PlayerChoiceInfo (structure)

- `objectGUID`: WOWGUID
- `choiceID`: number
- `questionText`: string
- `pendingChoiceText`: string
- `uiTextureKit`: textureKit
- `hideWarboardHeader`: bool
- `keepOpenAfterChoice`: bool
- `requiresSelection`: bool
- `hideAnswerArt`: bool
- `playerChoiceLayout`: PlayerChoiceLayout
- `options`: PlayerChoiceOptionInfo[]
- `soundKitID`: number, may be nil
- `closeUISoundKitID`: number, may be nil

### PlayerChoiceOptionButtonInfo (structure)

- `id`: number
- `text`: string
- `disabled`: bool
- `showCheckmark`: bool
- `hideButtonShowText`: bool
- `selected`: bool
- `confirmation`: string, may be nil
- `tooltip`: string, may be nil
- `rewardQuestID`: number, may be nil
- `soundKitID`: number, may be nil
- `listText`: string, may be nil

### PlayerChoiceOptionInfo (structure)

- `id`: number
- `description`: string
- `header`: string
- `choiceArtID`: number
- `desaturatedArt`: bool
- `disabledOption`: bool
- `hasRewards`: bool
- `rewardInfo`: PlayerChoiceOptionRewardInfo
- `uiTextureKit`: textureKit
- `maxStacks`: number
- `buttons`: PlayerChoiceOptionButtonInfo[]
- `widgetSetID`: number, may be nil
- `spellID`: number, may be nil
- `rarity`: PlayerChoiceRarity, may be nil
- `typeArtID`: number, may be nil
- `headerIconAtlasElement`: string, may be nil
- `subHeader`: string, may be nil
- `consolidateWidgets`: bool

### PlayerChoiceOptionRewardInfo (structure)

- `currencyRewards`: PlayerChoiceRewardCurrencyInfo[]
- `itemRewards`: PlayerChoiceRewardItemInfo[]
- `repRewards`: PlayerChoiceRewardReputationInfo[]

### PlayerChoiceRewardCurrencyInfo (structure)

- `currencyId`: number
- `name`: string
- `currencyTexture`: number
- `quantity`: number
- `isCurrencyContainer`: bool

### PlayerChoiceRewardItemInfo (structure)

- `itemId`: number
- `name`: string
- `quantity`: number

### PlayerChoiceRewardReputationInfo (structure)

- `factionId`: number
- `quantity`: number

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