# C_ArtifactUI: 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_ArtifactUI

## Functions

### C_ArtifactUI.AddPower

```lua
success = C_ArtifactUI.AddPower(powerID)
```

Arguments:
- `powerID`: number

Returns:
- `success`: bool

### C_ArtifactUI.ApplyCursorRelicToSlot

```lua
C_ArtifactUI.ApplyCursorRelicToSlot(relicSlotIndex)
```

Arguments:
- `relicSlotIndex`: luaIndex

### C_ArtifactUI.CanApplyArtifactRelic

```lua
canApply = C_ArtifactUI.CanApplyArtifactRelic(relicItemID, onlyUnlocked)
```

Arguments:
- `relicItemID`: number
- `onlyUnlocked`: bool

Returns:
- `canApply`: bool

### C_ArtifactUI.CanApplyCursorRelicToSlot

```lua
canApply = C_ArtifactUI.CanApplyCursorRelicToSlot(relicSlotIndex)
```

Arguments:
- `relicSlotIndex`: luaIndex

Returns:
- `canApply`: bool

### C_ArtifactUI.CanApplyRelicItemIDToEquippedArtifactSlot

```lua
canApply = C_ArtifactUI.CanApplyRelicItemIDToEquippedArtifactSlot(relicItemID, relicSlotIndex)
```

Arguments:
- `relicItemID`: number
- `relicSlotIndex`: luaIndex

Returns:
- `canApply`: bool

### C_ArtifactUI.CanApplyRelicItemIDToSlot

```lua
canApply = C_ArtifactUI.CanApplyRelicItemIDToSlot(relicItemID, relicSlotIndex)
```

Arguments:
- `relicItemID`: number
- `relicSlotIndex`: luaIndex

Returns:
- `canApply`: bool

### C_ArtifactUI.CheckRespecNPC

```lua
canRespec = C_ArtifactUI.CheckRespecNPC()
```

Returns:
- `canRespec`: bool

### C_ArtifactUI.Clear

```lua
C_ArtifactUI.Clear()
```

### C_ArtifactUI.ClearForgeCamera

```lua
C_ArtifactUI.ClearForgeCamera()
```

### C_ArtifactUI.ConfirmRespec

```lua
C_ArtifactUI.ConfirmRespec()
```

### C_ArtifactUI.DoesEquippedArtifactHaveAnyRelicsSlotted

```lua
hasAnyRelicsSlotted = C_ArtifactUI.DoesEquippedArtifactHaveAnyRelicsSlotted()
```

Returns:
- `hasAnyRelicsSlotted`: bool

### C_ArtifactUI.GetAppearanceInfo

```lua
artifactAppearanceID, appearanceName, displayIndex, unlocked, failureDescription, uiCameraID, altHandCameraID, swatchColorR, swatchColorG, swatchColorB, modelOpacity, modelSaturation, obtainable = C_ArtifactUI.GetAppearanceInfo(appearanceSetIndex, appearanceIndex)
```

May return nothing.

Arguments:
- `appearanceSetIndex`: number
- `appearanceIndex`: number

Returns:
- `artifactAppearanceID`: number
- `appearanceName`: string
- `displayIndex`: number
- `unlocked`: bool
- `failureDescription`: string, may be nil
- `uiCameraID`: number
- `altHandCameraID`: number, may be nil
- `swatchColorR`: number
- `swatchColorG`: number
- `swatchColorB`: number
- `modelOpacity`: number
- `modelSaturation`: number
- `obtainable`: bool

### C_ArtifactUI.GetAppearanceInfoByID

```lua
artifactAppearanceSetID, artifactAppearanceID, appearanceName, displayIndex, unlocked, failureDescription, uiCameraID, altHandCameraID, swatchColorR, swatchColorG, swatchColorB, modelOpacity, modelSaturation, obtainable = C_ArtifactUI.GetAppearanceInfoByID(artifactAppearanceID)
```

May return nothing.

Arguments:
- `artifactAppearanceID`: number

Returns:
- `artifactAppearanceSetID`: number
- `artifactAppearanceID`: number
- `appearanceName`: string
- `displayIndex`: number
- `unlocked`: bool
- `failureDescription`: string, may be nil
- `uiCameraID`: number
- `altHandCameraID`: number, may be nil
- `swatchColorR`: number
- `swatchColorG`: number
- `swatchColorB`: number
- `modelOpacity`: number
- `modelSaturation`: number
- `obtainable`: bool

### C_ArtifactUI.GetAppearanceSetInfo

```lua
artifactAppearanceSetID, appearanceSetName, appearanceSetDescription, numAppearances = C_ArtifactUI.GetAppearanceSetInfo(appearanceSetIndex)
```

May return nothing.

Arguments:
- `appearanceSetIndex`: number

Returns:
- `artifactAppearanceSetID`: number
- `appearanceSetName`: string
- `appearanceSetDescription`: string
- `numAppearances`: number

### C_ArtifactUI.GetArtifactArtInfo

```lua
artifactArtInfo = C_ArtifactUI.GetArtifactArtInfo()
```

May return nothing.

Returns:
- `artifactArtInfo`: ArtifactArtInfo

### C_ArtifactUI.GetArtifactInfo

```lua
itemID, altItemID, name, icon, xp, pointsSpent, quality, artifactAppearanceID, appearanceModID, itemAppearanceID, altItemAppearanceID, altOnTop, tier = C_ArtifactUI.GetArtifactInfo()
```

May return nothing.

Returns:
- `itemID`: number
- `altItemID`: number, may be nil
- `name`: string
- `icon`: fileID
- `xp`: number
- `pointsSpent`: number
- `quality`: number
- `artifactAppearanceID`: number
- `appearanceModID`: number
- `itemAppearanceID`: number, may be nil
- `altItemAppearanceID`: number, may be nil
- `altOnTop`: bool
- `tier`: ArtifactTiers

### C_ArtifactUI.GetArtifactItemID

```lua
itemID = C_ArtifactUI.GetArtifactItemID()
```

May return nothing.

Returns:
- `itemID`: number

### C_ArtifactUI.GetArtifactTier

```lua
tier = C_ArtifactUI.GetArtifactTier()
```

Returns:
- `tier`: ArtifactTiers, may be nil

### C_ArtifactUI.GetArtifactXPRewardTargetInfo

```lua
name, icon = C_ArtifactUI.GetArtifactXPRewardTargetInfo(artifactCategoryID)
```

May return nothing.

Arguments:
- `artifactCategoryID`: number

Returns:
- `name`: string
- `icon`: fileID

### C_ArtifactUI.GetCostForPointAtRank

```lua
cost = C_ArtifactUI.GetCostForPointAtRank(rank, tier)
```

Arguments:
- `rank`: number
- `tier`: ArtifactTiers

Returns:
- `cost`: number

### C_ArtifactUI.GetEquippedArtifactArtInfo

```lua
artifactArtInfo = C_ArtifactUI.GetEquippedArtifactArtInfo()
```

May return nothing.

Returns:
- `artifactArtInfo`: ArtifactArtInfo

### C_ArtifactUI.GetEquippedArtifactInfo

```lua
itemID, altItemID, name, icon, xp, pointsSpent, quality, artifactAppearanceID, appearanceModID, itemAppearanceID, altItemAppearanceID, altOnTop, tier = C_ArtifactUI.GetEquippedArtifactInfo()
```

May return nothing.

Returns:
- `itemID`: number
- `altItemID`: number, may be nil
- `name`: string
- `icon`: fileID
- `xp`: number
- `pointsSpent`: number
- `quality`: number
- `artifactAppearanceID`: number
- `appearanceModID`: number
- `itemAppearanceID`: number, may be nil
- `altItemAppearanceID`: number, may be nil
- `altOnTop`: bool
- `tier`: ArtifactTiers

### C_ArtifactUI.GetEquippedArtifactItemID

```lua
itemID = C_ArtifactUI.GetEquippedArtifactItemID()
```

May return nothing.

Returns:
- `itemID`: number

### C_ArtifactUI.GetEquippedArtifactNumRelicSlots

```lua
numRelicSlots = C_ArtifactUI.GetEquippedArtifactNumRelicSlots([onlyUnlocked])
```

Arguments:
- `onlyUnlocked`: bool, default false. If true then only the relic slots that are unlocked will be considered.

Returns:
- `numRelicSlots`: number

### C_ArtifactUI.GetEquippedArtifactRelicInfo

```lua
name, icon, slotTypeName, link = C_ArtifactUI.GetEquippedArtifactRelicInfo(relicSlotIndex)
```

May return nothing.

Arguments:
- `relicSlotIndex`: luaIndex

Returns:
- `name`: string
- `icon`: fileID
- `slotTypeName`: cstring. Matches the socket identifiers used in the socketing system.
- `link`: string

### C_ArtifactUI.GetEquippedRelicLockedReason

```lua
lockedReason = C_ArtifactUI.GetEquippedRelicLockedReason(relicSlotIndex)
```

Arguments:
- `relicSlotIndex`: luaIndex

Returns:
- `lockedReason`: string, may be nil

### C_ArtifactUI.GetForgeRotation

```lua
forgeRotationX, forgeRotationY, forgeRotationZ = C_ArtifactUI.GetForgeRotation()
```

Returns:
- `forgeRotationX`: number
- `forgeRotationY`: number
- `forgeRotationZ`: number

### C_ArtifactUI.GetItemLevelIncreaseProvidedByRelic

```lua
itemIevelIncrease = C_ArtifactUI.GetItemLevelIncreaseProvidedByRelic(itemLinkOrID)
```

May return nothing.

Arguments:
- `itemLinkOrID`: ItemInfo

Returns:
- `itemIevelIncrease`: number

### C_ArtifactUI.GetMetaPowerInfo

```lua
spellID, powerCost, currentRank = C_ArtifactUI.GetMetaPowerInfo()
```

Returns:
- `spellID`: number
- `powerCost`: number
- `currentRank`: number

### C_ArtifactUI.GetNumAppearanceSets

```lua
numAppearanceSets = C_ArtifactUI.GetNumAppearanceSets()
```

Returns:
- `numAppearanceSets`: number

### C_ArtifactUI.GetNumObtainedArtifacts

```lua
numObtainedArtifacts = C_ArtifactUI.GetNumObtainedArtifacts()
```

Returns:
- `numObtainedArtifacts`: number

### C_ArtifactUI.GetNumRelicSlots

```lua
numRelicSlots = C_ArtifactUI.GetNumRelicSlots([onlyUnlocked])
```

Arguments:
- `onlyUnlocked`: bool, default false. If true then only the relic slots that are unlocked will be considered.

Returns:
- `numRelicSlots`: number

### C_ArtifactUI.GetPointsRemaining

```lua
pointsRemaining = C_ArtifactUI.GetPointsRemaining()
```

Returns:
- `pointsRemaining`: number

### C_ArtifactUI.GetPowerHyperlink

```lua
link = C_ArtifactUI.GetPowerHyperlink(powerID)
```

Arguments:
- `powerID`: number

Returns:
- `link`: cstring

### C_ArtifactUI.GetPowerInfo

```lua
powerInfo = C_ArtifactUI.GetPowerInfo(powerID)
```

May return nothing.

Arguments:
- `powerID`: number

Returns:
- `powerInfo`: ArtifactPowerInfo

### C_ArtifactUI.GetPowerLinks

```lua
linkingPowerID = C_ArtifactUI.GetPowerLinks(powerID)
```

Arguments:
- `powerID`: number

Returns:
- `linkingPowerID`: number[]

### C_ArtifactUI.GetPowers

```lua
powerID = C_ArtifactUI.GetPowers()
```

May return nothing.

Returns:
- `powerID`: number[]

### C_ArtifactUI.GetPowersAffectedByRelic

```lua
powerIDs = C_ArtifactUI.GetPowersAffectedByRelic(relicSlotIndex)
```

Arguments:
- `relicSlotIndex`: luaIndex

Returns:
- `powerIDs`: number

### C_ArtifactUI.GetPowersAffectedByRelicItemLink

```lua
powerIDs = C_ArtifactUI.GetPowersAffectedByRelicItemLink(relicItemInfo)
```

Arguments:
- `relicItemInfo`: ItemInfo

Returns:
- `powerIDs`: number

### C_ArtifactUI.GetPreviewAppearance

```lua
artifactAppearanceID = C_ArtifactUI.GetPreviewAppearance()
```

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

### C_ArtifactUI.GetRelicInfo

```lua
name, icon, slotTypeName, link = C_ArtifactUI.GetRelicInfo(relicSlotIndex)
```

May return nothing.

Arguments:
- `relicSlotIndex`: luaIndex

Returns:
- `name`: string
- `icon`: fileID
- `slotTypeName`: cstring. Matches the socket identifiers used in the socketing system.
- `link`: string

### C_ArtifactUI.GetRelicInfoByItemID

```lua
name, icon, slotTypeName, link = C_ArtifactUI.GetRelicInfoByItemID(itemID)
```

May return nothing.

Arguments:
- `itemID`: number

Returns:
- `name`: string
- `icon`: fileID
- `slotTypeName`: cstring. Matches the socket identifiers used in the socketing system.
- `link`: string

### C_ArtifactUI.GetRelicLockedReason

```lua
lockedReason = C_ArtifactUI.GetRelicLockedReason(relicSlotIndex)
```

Arguments:
- `relicSlotIndex`: luaIndex

Returns:
- `lockedReason`: string, may be nil

### C_ArtifactUI.GetRelicSlotType

```lua
slotTypeName = C_ArtifactUI.GetRelicSlotType(relicSlotIndex)
```

May return nothing.

Arguments:
- `relicSlotIndex`: luaIndex

Returns:
- `slotTypeName`: cstring

### C_ArtifactUI.GetRespecArtifactArtInfo

```lua
artifactArtInfo = C_ArtifactUI.GetRespecArtifactArtInfo()
```

May return nothing.

Returns:
- `artifactArtInfo`: ArtifactArtInfo

### C_ArtifactUI.GetRespecArtifactInfo

```lua
itemID, altItemID, name, icon, xp, pointsSpent, quality, artifactAppearanceID, appearanceModID, itemAppearanceID, altItemAppearanceID, altOnTop, tier = C_ArtifactUI.GetRespecArtifactInfo()
```

May return nothing.

Returns:
- `itemID`: number
- `altItemID`: number, may be nil
- `name`: string
- `icon`: fileID
- `xp`: number
- `pointsSpent`: number
- `quality`: number
- `artifactAppearanceID`: number
- `appearanceModID`: number
- `itemAppearanceID`: number, may be nil
- `altItemAppearanceID`: number, may be nil
- `altOnTop`: bool
- `tier`: ArtifactTiers

### C_ArtifactUI.GetRespecCost

```lua
cost = C_ArtifactUI.GetRespecCost()
```

Returns:
- `cost`: number

### C_ArtifactUI.GetTotalPowerCost

```lua
totalArtifactPowerCost = C_ArtifactUI.GetTotalPowerCost(startingTrait, numTraits, artifactTier)
```

May return nothing.

Arguments:
- `startingTrait`: luaIndex
- `numTraits`: number
- `artifactTier`: ArtifactTiers

Returns:
- `totalArtifactPowerCost`: number

### C_ArtifactUI.GetTotalPurchasedRanks

```lua
totalPurchasedRanks = C_ArtifactUI.GetTotalPurchasedRanks()
```

Returns:
- `totalPurchasedRanks`: number

### C_ArtifactUI.IsArtifactDisabled

```lua
artifactDisabled = C_ArtifactUI.IsArtifactDisabled()
```

Returns:
- `artifactDisabled`: bool

### C_ArtifactUI.IsArtifactItem

```lua
isArtifact = C_ArtifactUI.IsArtifactItem(itemLocation)
```

Arguments:
- `itemLocation`: ItemLocation

Returns:
- `isArtifact`: bool

### C_ArtifactUI.IsAtForge

```lua
isAtForge = C_ArtifactUI.IsAtForge()
```

Returns:
- `isAtForge`: bool

### C_ArtifactUI.IsEquippedArtifactDisabled

```lua
artifactDisabled = C_ArtifactUI.IsEquippedArtifactDisabled()
```

Returns:
- `artifactDisabled`: bool

### C_ArtifactUI.IsEquippedArtifactMaxed

```lua
artifactMaxed = C_ArtifactUI.IsEquippedArtifactMaxed()
```

Returns:
- `artifactMaxed`: bool

### C_ArtifactUI.IsMaxedByRulesOrEffect

```lua
isEffectivelyMaxed = C_ArtifactUI.IsMaxedByRulesOrEffect()
```

Returns:
- `isEffectivelyMaxed`: bool

### C_ArtifactUI.IsPowerKnown

```lua
known = C_ArtifactUI.IsPowerKnown(powerID)
```

Arguments:
- `powerID`: number

Returns:
- `known`: bool

### C_ArtifactUI.IsViewedArtifactEquipped

```lua
isViewedArtifactEquipped = C_ArtifactUI.IsViewedArtifactEquipped()
```

Returns:
- `isViewedArtifactEquipped`: bool

### C_ArtifactUI.SetAppearance

```lua
C_ArtifactUI.SetAppearance(artifactAppearanceID)
```

Arguments:
- `artifactAppearanceID`: number

### C_ArtifactUI.SetForgeCamera

```lua
C_ArtifactUI.SetForgeCamera()
```

### C_ArtifactUI.SetForgeRotation

```lua
C_ArtifactUI.SetForgeRotation(forgeRotationX, forgeRotationY, forgeRotationZ)
```

Arguments:
- `forgeRotationX`: number
- `forgeRotationY`: number
- `forgeRotationZ`: number

### C_ArtifactUI.SetPreviewAppearance

```lua
C_ArtifactUI.SetPreviewAppearance([artifactAppearanceID])
```

Call without an argument to clear the preview.

Arguments:
- `artifactAppearanceID`: number, default 0

### C_ArtifactUI.ShouldSuppressForgeRotation

```lua
shouldSuppressForgeRotation = C_ArtifactUI.ShouldSuppressForgeRotation()
```

Returns:
- `shouldSuppressForgeRotation`: bool

## Events

### ARTIFACT_CLOSE

No payload.

### ARTIFACT_ENDGAME_REFUND

Payload, after the event's name:
- `numRefundedPowers`: number
- `refundedTier`: ArtifactTiers
- `bagOrSlotIndex`: luaIndex
- `slotIndex`: luaIndex, may be nil

### ARTIFACT_RELIC_FORGE_CLOSE

No payload.

### ARTIFACT_RELIC_FORGE_PREVIEW_RELIC_CHANGED

No payload.

### ARTIFACT_RELIC_FORGE_UPDATE

No payload.

### ARTIFACT_RELIC_INFO_RECEIVED

No payload.

### ARTIFACT_RESPEC_PROMPT

No payload.

### ARTIFACT_TIER_CHANGED

Payload, after the event's name:
- `newTier`: luaIndex
- `bagOrSlotIndex`: luaIndex
- `slotIndex`: luaIndex, may be nil

### ARTIFACT_UPDATE

Payload, after the event's name:
- `newItem`: bool

### ARTIFACT_XP_UPDATE

No payload.

## Tables

### ArtifactAppearanceInfo (structure)

- `artifactAppearanceID`: number
- `appearanceName`: string
- `displayIndex`: number
- `unlocked`: bool
- `failureDescription`: string, may be nil
- `uiCameraID`: number
- `altHandCameraID`: number, may be nil
- `swatchColor`: colorRGB
- `modelOpacity`: number
- `modelSaturation`: number
- `obtainable`: bool

### ArtifactAppearanceSetInfo (structure)

- `artifactAppearanceSetID`: number
- `appearanceSetName`: string
- `appearanceSetDescription`: string
- `numAppearances`: number

### ArtifactArtInfo (structure)

- `textureKit`: textureKit
- `titleName`: string
- `titleColor`: colorRGB
- `barConnectedColor`: colorRGB
- `barDisconnectedColor`: colorRGB
- `uiModelSceneID`: number
- `spellVisualKitID`: number

### ArtifactInfo (structure)

- `itemID`: number
- `altItemID`: number, may be nil
- `name`: string
- `icon`: fileID
- `xp`: number
- `pointsSpent`: number
- `quality`: number
- `artifactAppearanceID`: number
- `appearanceModID`: number
- `itemAppearanceID`: number, may be nil
- `altItemAppearanceID`: number, may be nil
- `altOnTop`: bool
- `tier`: ArtifactTiers

### ArtifactMetaPowerInfo (structure)

- `spellID`: number
- `powerCost`: number
- `currentRank`: number

### ArtifactPowerInfo (structure)

- `spellID`: number
- `cost`: number
- `currentRank`: number
- `maxRank`: number
- `bonusRanks`: number
- `numMaxRankBonusFromTier`: number
- `prereqsMet`: bool
- `isStart`: bool
- `isGoldMedal`: bool
- `isFinal`: bool
- `tier`: luaIndex
- `position`: vector2
- `offset`: vector2, may be nil
- `linearIndex`: luaIndex, may be nil

### ArtifactRelicInfo (structure)

- `name`: string
- `icon`: fileID
- `slotTypeName`: cstring. Matches the socket identifiers used in the socketing system.
- `link`: 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."
