# C_HousingExpertMode: 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_HousingExpertMode

## Functions

### C_HousingExpertMode.CancelActiveEditing

```lua
C_HousingExpertMode.CancelActiveEditing()
```

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

### C_HousingExpertMode.CommitDecorMovement

```lua
C_HousingExpertMode.CommitDecorMovement()
```

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

### C_HousingExpertMode.CommitHouseExteriorPosition

```lua
C_HousingExpertMode.CommitHouseExteriorPosition()
```

Attempt to save the changes made to the House Exterior's position within the plot

### C_HousingExpertMode.GetHoveredDecorInfo

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

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

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

### C_HousingExpertMode.GetPrecisionSubmode

```lua
activeSubMode = C_HousingExpertMode.GetPrecisionSubmode()
```

Returns the currently active Expert submode, if there is one

Returns:
- `activeSubMode`: HousingPrecisionSubmode, may be nil

### C_HousingExpertMode.GetPrecisionSubmodeRestriction

```lua
restriction = C_HousingExpertMode.GetPrecisionSubmodeRestriction(subMode)
```

Returns the type of restriction currently active on the submode; Will return HousingExpertSubmodeRestriction:None if submode is not currently restricted

Arguments:
- `subMode`: HousingPrecisionSubmode

Returns:
- `restriction`: HousingExpertSubmodeRestriction

### C_HousingExpertMode.GetSelectedDecorInfo

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

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

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

### C_HousingExpertMode.IsDecorSelected

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

Returns true if a placed decor instance is currently selected

Returns:
- `hasSelectedDecor`: bool

### C_HousingExpertMode.IsGridVisible

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

Returns:
- `gridVisible`: bool

### C_HousingExpertMode.IsHouseExteriorHovered

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

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

Returns:
- `isHouseExteriorHovered`: bool

### C_HousingExpertMode.IsHouseExteriorSelected

```lua
isHouseExteriorSelected = C_HousingExpertMode.IsHouseExteriorSelected()
```

Returns true if the house's exterior is currently selected

Returns:
- `isHouseExteriorSelected`: bool

### C_HousingExpertMode.IsHoveringDecor

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

Returns true if a placed decor instance is currently being hovered

Returns:
- `isHoveringDecor`: bool

### C_HousingExpertMode.RemoveSelectedDecor

```lua
C_HousingExpertMode.RemoveSelectedDecor()
```

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

### C_HousingExpertMode.ResetPrecisionChanges

```lua
C_HousingExpertMode.ResetPrecisionChanges(activeSubmodeOnly)
```

Reset the selected target's transform back to default values; This is NOT an undo, meaning it will completely reset the transform value to default, NOT just recently-made changes

Arguments:
- `activeSubmodeOnly`: bool. If true, only transform values associated with the currently active submode with be reset (ex: in Scale submode, only target's scale will be reset); If false, all transform values will be reset

### C_HousingExpertMode.SelectNextRotationAxis

```lua
C_HousingExpertMode.SelectNextRotationAxis()
```

In the rotation submode, swaps the selected axis to the next available one, in order of X -> Y -> Z (wrapping back around to X again, etc); If no axis is selected, selects the first available one, also in that order

### C_HousingExpertMode.SetGridVisible

```lua
C_HousingExpertMode.SetGridVisible(gridVisible)
```

Arguments:
- `gridVisible`: bool

### C_HousingExpertMode.SetPrecisionIncrementingActive

```lua
C_HousingExpertMode.SetPrecisionIncrementingActive(incrementType, active)
```

Sets a specific type of incremental change active or inactive; Whilever that type is active and target stays selected, incremental changes of that type will continue to be made every frame

Arguments:
- `incrementType`: HousingIncrementType
- `active`: bool

### C_HousingExpertMode.SetPrecisionSubmode

```lua
C_HousingExpertMode.SetPrecisionSubmode(subMode)
```

Activate a specific Expert submode

Arguments:
- `subMode`: HousingPrecisionSubmode

## Events

### HOUSING_DECOR_PRECISION_MANIPULATION_EVENT

Payload, after the event's name:
- `event`: TransformManipulatorEvent

### HOUSING_DECOR_PRECISION_MANIPULATION_STATUS_CHANGED

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

### HOUSING_DECOR_PRECISION_SUBMODE_CHANGED

Payload, after the event's name:
- `activeSubmode`: HousingPrecisionSubmode, may be nil

### HOUSING_EXPERT_MODE_HOVERED_TARGET_CHANGED

Payload, after the event's name:
- `hasHoveredTarget`: bool
- `targetType`: HousingExpertModeTargetType

### HOUSING_EXPERT_MODE_PLACEMENT_FLAGS_UPDATED

Payload, after the event's name:
- `targetType`: HousingExpertModeTargetType
- `activeFlags`: HousingDecorPlacementRestriction

### HOUSING_EXPERT_MODE_SELECTED_TARGET_CHANGED

Payload, after the event's name:
- `hasSelectedTarget`: bool
- `targetType`: HousingExpertModeTargetType

## Tables

### Enum.HousingExpertModeTargetType (enumeration)

- `None` = 0
- `Decor` = 1
- `House` = 2

### Enum.HousingExpertSubmodeRestriction (enumeration)

- `None` = 0
- `NotInExpertMode` = 1
- `NoHouseExteriorScale` = 2
- `NoWMOScale` = 3

### Enum.HousingIncrementType (enumeration)

- `Left` = 1
- `Right` = 2
- `Forward` = 4
- `Back` = 8
- `Up` = 16
- `Down` = 32
- `RotateLeft` = 64
- `RotateRight` = 128
- `ScaleUp` = 256
- `ScaleDown` = 512

### Enum.HousingPrecisionSubmode (enumeration)

- `Translate` = 0
- `Rotate` = 1
- `Scale` = 2

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