# C_HousingDecor: 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_HousingDecor

## Functions

### C_HousingDecor.AnyDecorPlacedInRoom

```lua
isPlaced = C_HousingDecor.AnyDecorPlacedInRoom(roomGUID)
```

Returns true if any decor objects are placed in a given room

Arguments:
- `roomGUID`: WOWGUID

Returns:
- `isPlaced`: bool

### C_HousingDecor.CancelActiveEditing

```lua
C_HousingDecor.CancelActiveEditing()
```

Cancels all in-progress editing of the selected target, which will reset any unsaved changes and deselect the active target

### C_HousingDecor.CommitDecorMovement

```lua
C_HousingDecor.CommitDecorMovement()
```

Attempt to save the changes made to the currently selected decor instance

### C_HousingDecor.EnterPreviewState

```lua
C_HousingDecor.EnterPreviewState()
```

### C_HousingDecor.ExitPreviewState

```lua
C_HousingDecor.ExitPreviewState()
```

### C_HousingDecor.GetAllMaxPlacementBudgets

```lua
interiorMaxBudgets, exteriorMaxBudgets = C_HousingDecor.GetAllMaxPlacementBudgets()
```

Returns the interior and exterior max decor placement budgets for the current owned house interior or plot; Can be increased via house level

Returns:
- `interiorMaxBudgets`: number[], may be nil. Map of budget type to max budget amount; Will be nil if not in an owned House or Plot
- `exteriorMaxBudgets`: number[], may be nil. Map of budget type to max budget amount; Will be nil if not in an owned House or Plot

### C_HousingDecor.GetAllPlacedDecor

```lua
placedDecor = C_HousingDecor.GetAllPlacedDecor()
```

Placed Decor List APIs currently restricted due to being potentially very expensive operations, may be reworked & opened up in the future

Returns:
- `placedDecor`: HousingDecorInstanceListEntry[]

### C_HousingDecor.GetAllSpentPlacementBudgets

```lua
interiorSpentBudgets, exteriorSpentBudgets = C_HousingDecor.GetAllSpentPlacementBudgets()
```

Returns how much of the interior and exterior placement budgets for the current owned house interior or plot's decor budget have been spent

Returns:
- `interiorSpentBudgets`: number[], may be nil. Map of budget type to spent budget amount; Will be nil if not in an owned House or Plot
- `exteriorSpentBudgets`: number[], may be nil. Map of budget type to spent budget amount; Will be nil if not in an owned House or Plot

### C_HousingDecor.GetDecorAssignedPetName

```lua
name = C_HousingDecor.GetDecorAssignedPetName(decorGUID)
```

Returns pet name for the placed decor instance associated with the passed Decor GUID, if there is one

Arguments:
- `decorGUID`: WOWGUID

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

### C_HousingDecor.GetDecorCanAttachPet

```lua
canAttachPet = C_HousingDecor.GetDecorCanAttachPet(decorID)
```

Arguments:
- `decorID`: number

Returns:
- `canAttachPet`: bool

### C_HousingDecor.GetDecorHyperlink

```lua
hyperLink = C_HousingDecor.GetDecorHyperlink(decorID)
```

May return nothing.

Arguments:
- `decorID`: number

Returns:
- `hyperLink`: string

### C_HousingDecor.GetDecorIcon

```lua
icon = C_HousingDecor.GetDecorIcon(decorID)
```

May return nothing.

Arguments:
- `decorID`: number

Returns:
- `icon`: fileID

### C_HousingDecor.GetDecorInstanceInfoForGUID

```lua
info = C_HousingDecor.GetDecorInstanceInfoForGUID(decorGUID)
```

Returns info for the placed decor instance associated with the passed Decor GUID, if there is one

Arguments:
- `decorGUID`: WOWGUID

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

### C_HousingDecor.GetDecorName

```lua
name = C_HousingDecor.GetDecorName(decorID)
```

May return nothing.

Arguments:
- `decorID`: number

Returns:
- `name`: string

### C_HousingDecor.GetHoveredDecorInfo

```lua
info = C_HousingDecor.GetHoveredDecorInfo()
```

Returns info for the placed decor instance currently being hovered, if there is one

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

### C_HousingDecor.GetMaxPetPlacementBudget

```lua
maxBudget = C_HousingDecor.GetMaxPetPlacementBudget()
```

Returns the max pet decor placement budget for the current owned house interior or plot

Returns:
- `maxBudget`: number, may be nil. Will be nil if not in an owned House or Plot

### C_HousingDecor.GetMaxPlacementBudget

```lua
maxBudget = C_HousingDecor.GetMaxPlacementBudget()
```

Returns the max decor placement budget for the current owned house interior or plot; Can be increased via house level

Returns:
- `maxBudget`: number, may be nil. Will be nil if not in an owned House or Plot

### C_HousingDecor.GetNumDecorPlaced

```lua
numPlaced = C_HousingDecor.GetNumDecorPlaced()
```

Returns the number of individual decor objects placed in the current house or plot; This is NOT the value used in placement budget calculations, see GetSpentPlacementBudget for that

Returns:
- `numPlaced`: number

### C_HousingDecor.GetNumPreviewDecor

```lua
numDecor = C_HousingDecor.GetNumPreviewDecor()
```

Returns:
- `numDecor`: number

### C_HousingDecor.GetSelectedDecorInfo

```lua
info = C_HousingDecor.GetSelectedDecorInfo()
```

Returns info for the placed decor instance that's currently selected, if there is one

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

### C_HousingDecor.GetSpentPetPlacementBudget

```lua
totalCost = C_HousingDecor.GetSpentPetPlacementBudget()
```

Returns how much of the current owned house interior or plot's pet decor placement budget has been spent

Returns:
- `totalCost`: number, may be nil. Will be nil if not in an owned House or Plot

### C_HousingDecor.GetSpentPlacementBudget

```lua
totalCost = C_HousingDecor.GetSpentPlacementBudget()
```

Returns how much of the current owned house interior or plot's decor placement budget has been spent; Different kinds of decor take up different budget amounts, so this value isn't an individual decor count, see GetNumDecorPlaced for that

Returns:
- `totalCost`: number, may be nil. Will be nil if not in an owned House or Plot

### C_HousingDecor.HasMaxPlacementBudget

```lua
hasMaxBudget = C_HousingDecor.HasMaxPlacementBudget()
```

Returns whether there's a max decor placement budget available and active for the current player, in the current house interior or plot

Returns:
- `hasMaxBudget`: bool

### C_HousingDecor.IsDecorSelected

```lua
hasSelectedDecor = C_HousingDecor.IsDecorSelected()
```

Returns true if a placed decor instance is currently selected

Returns:
- `hasSelectedDecor`: bool

### C_HousingDecor.IsGridVisible

```lua
gridVisible = C_HousingDecor.IsGridVisible()
```

Returns:
- `gridVisible`: bool

### C_HousingDecor.IsHouseExteriorDoorHovered

```lua
isHouseExteriorDoorHovered = C_HousingDecor.IsHouseExteriorDoorHovered()
```

Returns true if the entry door of the house's exterior is currently being hovered

Returns:
- `isHouseExteriorDoorHovered`: bool

### C_HousingDecor.IsHouseExteriorHovered

```lua
isHouseExteriorHovered = C_HousingDecor.IsHouseExteriorHovered()
```

Returns true if the house's exterior is currently being hovered

Returns:
- `isHouseExteriorHovered`: bool

### C_HousingDecor.IsHoveringDecor

```lua
isHoveringDecor = C_HousingDecor.IsHoveringDecor()
```

Returns true if a placed decor instance is currently being hovered

Returns:
- `isHoveringDecor`: bool

### C_HousingDecor.IsModeDisabledForPreviewState

```lua
isModeDisabled = C_HousingDecor.IsModeDisabledForPreviewState(mode)
```

Arguments:
- `mode`: HouseEditorMode

Returns:
- `isModeDisabled`: bool

### C_HousingDecor.IsPreviewState

```lua
isPreviewState = C_HousingDecor.IsPreviewState()
```

Returns:
- `isPreviewState`: bool

### C_HousingDecor.RemovePlacedDecorEntry

```lua
C_HousingDecor.RemovePlacedDecorEntry(decorGUID)
```

Placed Decor List APIs currently restricted due to being potentially very expensive operations, may be reworked & opened up in the future

Arguments:
- `decorGUID`: WOWGUID

### C_HousingDecor.RemoveSelectedDecor

```lua
C_HousingDecor.RemoveSelectedDecor()
```

Attempt to return the currently selected decor instance back to the house chest

### C_HousingDecor.SetGridVisible

```lua
C_HousingDecor.SetGridVisible(gridVisible)
```

Arguments:
- `gridVisible`: bool

### C_HousingDecor.SetPlacedDecorEntryHovered

```lua
C_HousingDecor.SetPlacedDecorEntryHovered(decorGUID, hovered)
```

Placed Decor List APIs currently restricted due to being potentially very expensive operations, may be reworked & opened up in the future

Arguments:
- `decorGUID`: WOWGUID
- `hovered`: bool

### C_HousingDecor.SetPlacedDecorEntrySelected

```lua
C_HousingDecor.SetPlacedDecorEntrySelected(decorGUID, selected)
```

Placed Decor List APIs currently restricted due to being potentially very expensive operations, may be reworked & opened up in the future

Arguments:
- `decorGUID`: WOWGUID
- `selected`: bool

## Events

### HOUSE_DECOR_ADDED_TO_CHEST

Payload, after the event's name:
- `decorGUID`: WOWGUID
- `decorID`: number

### HOUSE_EXTERIOR_POSITION_FAILURE

Payload, after the event's name:
- `housingResult`: HousingResult

### HOUSE_EXTERIOR_POSITION_SUCCESS

No payload.

### HOUSING_DECOR_GRID_VISIBILITY_STATUS_CHANGED

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

### HOUSING_DECOR_PLACE_FAILURE

Payload, after the event's name:
- `housingResult`: HousingResult

### HOUSING_DECOR_PLACE_SUCCESS

Payload, after the event's name:
- `decorGUID`: WOWGUID
- `size`: HousingCatalogEntrySize
- `isNew`: bool. Will be true if the decor is newly placed from storage, false if it was already placed and just moved
- `isPreview`: bool

### HOUSING_DECOR_PREVIEW_STATE_CHANGED

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

### HOUSING_DECOR_REMOVED

Payload, after the event's name:
- `decorGUID`: WOWGUID

### HOUSING_DECOR_SELECT_RESPONSE

Payload, after the event's name:
- `result`: HousingResult

### HOUSING_NEW_DECOR_PLACE_COMPLETE

Payload, after the event's name:
- `decorGUID`: WOWGUID

### HOUSING_NUM_DECOR_PLACED_CHANGED

No payload.

## Tables

### Enum.LightRadiusIndicatorType (enumeration)

- `Always` = 0
- `Overlap` = 1
- `Never` = 2

### HousingDecorInstanceListEntry (structure)

Smaller structs with the minimum fields from HousingDecorInstanceInfo needed to identify/display a slim list of placed decor

- `decorGUID`: WOWGUID
- `name`: cstring

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