# C_ItemInteraction: 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_ItemInteraction

## Functions

### C_ItemInteraction.ClearPendingItem

```lua
C_ItemInteraction.ClearPendingItem()
```

### C_ItemInteraction.CloseUI

```lua
C_ItemInteraction.CloseUI()
```

### C_ItemInteraction.GetChargeInfo

```lua
chargeInfo = C_ItemInteraction.GetChargeInfo()
```

Returns:
- `chargeInfo`: ItemInteractionChargeInfo

### C_ItemInteraction.GetItemConversionCurrencyCost

```lua
conversionCost = C_ItemInteraction.GetItemConversionCurrencyCost(item)
```

Arguments:
- `item`: ItemLocation

Returns:
- `conversionCost`: ConversionCurrencyCost

### C_ItemInteraction.GetItemInteractionInfo

```lua
info = C_ItemInteraction.GetItemInteractionInfo()
```

Returns:
- `info`: ItemInteractionFrameInfo, may be nil

### C_ItemInteraction.GetItemInteractionSpellId

```lua
spellId = C_ItemInteraction.GetItemInteractionSpellId()
```

Returns:
- `spellId`: number

### C_ItemInteraction.InitializeFrame

```lua
C_ItemInteraction.InitializeFrame()
```

### C_ItemInteraction.PerformItemInteraction

```lua
C_ItemInteraction.PerformItemInteraction()
```

### C_ItemInteraction.Reset

```lua
C_ItemInteraction.Reset()
```

### C_ItemInteraction.SetPendingItem

```lua
success = C_ItemInteraction.SetPendingItem([item])
```

Arguments:
- `item`: ItemLocation, may be nil

Returns:
- `success`: bool

## Events

### ITEM_INTERACTION_CHARGE_INFO_UPDATED

No payload.

### ITEM_INTERACTION_ITEM_SELECTION_UPDATED

Payload, after the event's name:
- `itemLocation`: ItemLocation, may be nil

## Tables

### ConversionCurrencyCost (structure)

- `currencyID`: number
- `amount`: number

### ItemInteractionChargeInfo (structure)

- `newChargeAmount`: number
- `rechargeRate`: number
- `timeToNextCharge`: number

### ItemInteractionFrameInfo (structure)

- `textureKit`: textureKit
- `openSoundKitID`: number
- `closeSoundKitID`: number
- `titleText`: string
- `tutorialText`: string
- `buttonText`: string
- `interactionType`: UIItemInteractionType
- `flags`: UIItemInteractionFlags
- `description`: string, may be nil
- `buttonTooltip`: string, may be nil
- `confirmationDescription`: string, may be nil
- `slotTooltip`: string, may be nil
- `cost`: number, may be nil
- `currencyTypeId`: number, may be nil
- `dropInSlotSoundKitId`: 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."
