World of Warcraft Forever API · C_HousingLayout.md, for your AI
C_HousingLayout
41 functions, 18 events, as Blizzard documents them for Forever 1.60.1 (70959).
Making an addon with an 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. It checks every call against this API before you try it in the game, then publishes it here. How it works.
Functions
C_HousingLayout.AnyRoomsOnFloor
anyRooms = C_HousingLayout.AnyRoomsOnFloor(floor)
Arguments
floor | number |
|---|
Returns
anyRooms | bool |
|---|
C_HousingLayout.CanSetViewedFloor
canSet = C_HousingLayout.CanSetViewedFloor(floor)
Arguments
floor | number |
|---|
Returns
canSet | bool |
|---|
C_HousingLayout.CancelActiveLayoutEditing
C_HousingLayout.CancelActiveLayoutEditing()
C_HousingLayout.ConfirmStairChoice
C_HousingLayout.ConfirmStairChoice([choice])
Arguments
choice | HousingLayoutStairDirection may be nil | If not set, the pending stair operation will be cancelled |
|---|
C_HousingLayout.DeselectFloorplan
C_HousingLayout.DeselectFloorplan()
C_HousingLayout.DeselectRoomOrDoor
C_HousingLayout.DeselectRoomOrDoor()
C_HousingLayout.GetBaseRoomFloor
floor = C_HousingLayout.GetBaseRoomFloor()
Returns
floor | number |
|---|
C_HousingLayout.GetHighestOccupiedFloorIndex
highestFloorIndex = C_HousingLayout.GetHighestOccupiedFloorIndex()
Returns
highestFloorIndex | number |
|---|
C_HousingLayout.GetLowestOccupiedFloorIndex
lowestFloorIndex = C_HousingLayout.GetLowestOccupiedFloorIndex()
Returns
lowestFloorIndex | number |
|---|
C_HousingLayout.GetNumActiveRooms
numRooms = C_HousingLayout.GetNumActiveRooms()
Returns
numRooms | number |
|---|
C_HousingLayout.GetRoomPlacementBudget
placementBudget = C_HousingLayout.GetRoomPlacementBudget()
Returns the max room placement budget for the current owned house's interior; Can be increased via house level
Returns
placementBudget | number may be nil | Will be nil if not in an owned House or Plot |
|---|
C_HousingLayout.GetRoomPlayerIsIn
roomGUID = C_HousingLayout.GetRoomPlayerIsIn()
Returns the guid of the interior room the player is standing in, or nil if not currently standing in one
May return nothing.
Returns
roomGUID | WOWGUID |
|---|
C_HousingLayout.GetSelectedBlueprintFloorplan
roomID, shareCode = C_HousingLayout.GetSelectedBlueprintFloorplan()
May return nothing.
Returns
roomID | number | |
|---|---|---|
shareCode | cstring |
C_HousingLayout.GetSelectedDoor
selectedDoorComponentID, roomGUID = C_HousingLayout.GetSelectedDoor()
If a door is selected, returns its component id and the guid of the room it belongs to; Otherwise returns nothing
May return nothing.
Returns
selectedDoorComponentID | number | |
|---|---|---|
roomGUID | WOWGUID |
C_HousingLayout.GetSelectedFloorplan
roomID = C_HousingLayout.GetSelectedFloorplan()
Returns
roomID | number may be nil |
|---|
C_HousingLayout.GetSelectedRoom
roomGUID = C_HousingLayout.GetSelectedRoom()
If a Room is selected, returns the room's guid; Otherwise returns nothing
May return nothing.
Returns
roomGUID | WOWGUID |
|---|
C_HousingLayout.GetSelectedStairwellRoomCount
stairwellRoomCount = C_HousingLayout.GetSelectedStairwellRoomCount()
Returns
stairwellRoomCount | number |
|---|
C_HousingLayout.GetSpentPlacementBudget
spentPlacementBudget = C_HousingLayout.GetSpentPlacementBudget()
Returns how much of the current owned house's room placement budget has been spent; Different kinds of rooms take up different budget amounts, so this value isn't an individual room count, see GetNumActiveRooms for that
Returns
spentPlacementBudget | number may be nil | Will be nil if not in an owned House |
|---|
C_HousingLayout.GetViewedFloor
floor = C_HousingLayout.GetViewedFloor()
Returns
floor | number |
|---|
C_HousingLayout.HasAnySelections
hasAnySelections = C_HousingLayout.HasAnySelections()
Returns true if any room, door, or floorplan is currently selected or being dragged
Returns
hasAnySelections | bool |
|---|
C_HousingLayout.HasRoomPlacementBudget
hasBudget = C_HousingLayout.HasRoomPlacementBudget()
Returns whether there's a max room placement budget available and active for the current player, in the current house's interior
Returns
hasBudget | bool |
|---|
C_HousingLayout.HasSelectedBlueprintFloorplan
hasSelectedBlueprintFloorplan = C_HousingLayout.HasSelectedBlueprintFloorplan()
Returns
hasSelectedBlueprintFloorplan | bool |
|---|
C_HousingLayout.HasSelectedDoor
hasSelectedDoor = C_HousingLayout.HasSelectedDoor()
Returns true if a door component is currently selected
Returns
hasSelectedDoor | bool |
|---|
C_HousingLayout.HasSelectedFloorplan
hasSelectedFloorplan = C_HousingLayout.HasSelectedFloorplan()
Returns
hasSelectedFloorplan | bool |
|---|
C_HousingLayout.HasSelectedRoom
hasSelectedRoom = C_HousingLayout.HasSelectedRoom()
Returns true if a room is selected, will NOT return true if a door is selected
Returns
hasSelectedRoom | bool |
|---|
C_HousingLayout.HasStairs
hasStairs = C_HousingLayout.HasStairs(roomRecordID)
Arguments
roomRecordID | number |
|---|
Returns
hasStairs | bool |
|---|
C_HousingLayout.HasValidConnection
canPlace = C_HousingLayout.HasValidConnection(roomGUID, componentID, roomId)
Arguments
roomGUID | WOWGUID | |
|---|---|---|
componentID | number | |
roomId | number |
Returns
canPlace | bool |
|---|
C_HousingLayout.IsBaseRoom
isBaseRoom = C_HousingLayout.IsBaseRoom(roomGUID)
Arguments
roomGUID | WOWGUID |
|---|
Returns
isBaseRoom | bool |
|---|
C_HousingLayout.IsDraggingRoom
isDragging, isAccessibleDrag = C_HousingLayout.IsDraggingRoom()
Returns
isDragging | bool | |
|---|---|---|
isAccessibleDrag | bool |
C_HousingLayout.MoveDraggedRoom
C_HousingLayout.MoveDraggedRoom(sourceDoorIndex, destRoom, destDoorIndex)
Attempt to move the room currently being dragged to a specific connection point on a specific other room
Arguments
sourceDoorIndex | number | |
|---|---|---|
destRoom | WOWGUID | |
destDoorIndex | number |
C_HousingLayout.MoveLayoutCamera
C_HousingLayout.MoveLayoutCamera(direction, isPressed)
Arguments
direction | HousingLayoutCameraDirection | |
|---|---|---|
isPressed | bool |
C_HousingLayout.RemoveRoom
C_HousingLayout.RemoveRoom(roomGUID)
Attempt to return a previously placed room to the House Chest
Arguments
roomGUID | WOWGUID |
|---|
C_HousingLayout.RoomHasStairs
hasStairs = C_HousingLayout.RoomHasStairs(roomGUID)
Returns true of the provided roomGUID is a stairwell. Returns false if roomGUID is invalid
Arguments
roomGUID | WOWGUID |
|---|
Returns
hasStairs | bool |
|---|
C_HousingLayout.RotateFocusedRoom
C_HousingLayout.RotateFocusedRoom(isLeft)
Rotates either the currently dragged or currently selected room, if either exist
Arguments
isLeft | bool |
|---|
C_HousingLayout.RotateRoom
C_HousingLayout.RotateRoom(roomGUID, isLeft)
Attempt to rotate an already placed room
Arguments
roomGUID | WOWGUID | |
|---|---|---|
isLeft | bool |
C_HousingLayout.SelectFloorplan
C_HousingLayout.SelectFloorplan(roomID)
Arguments
roomID | number |
|---|
C_HousingLayout.SetViewedFloor
C_HousingLayout.SetViewedFloor(floor)
Arguments
floor | number |
|---|
C_HousingLayout.StartDrag
C_HousingLayout.StartDrag()
C_HousingLayout.StopDrag
C_HousingLayout.StopDrag()
C_HousingLayout.StopDraggingRoom
C_HousingLayout.StopDraggingRoom()
C_HousingLayout.ZoomLayoutCamera
zoomChanged = C_HousingLayout.ZoomLayoutCamera(zoomIn)
Arguments
zoomIn | bool |
|---|
Returns
zoomChanged | bool |
|---|
Events
HOUSING_LAYOUT_DOOR_SELECTED
Fired when one of the door nodes of an already placed room has been selected
roomGUID | WOWGUID | |
|---|---|---|
componentID | number |
HOUSING_LAYOUT_DOOR_SELECTION_CHANGED
Fired when one of the door nodes of an already placed room has been selected or deselected
hasSelection | bool |
|---|
HOUSING_LAYOUT_DRAG_TARGET_CHANGED
Fired when an already placed room has either started or stopped being dragged
isDraggingRoom | bool |
|---|
HOUSING_LAYOUT_FLOORPLAN_SELECTION_CHANGED
Fired when a room option in the House Chest has been selected or deselected
hasSelection | bool | |
|---|---|---|
roomID | number | |
blueprintShareCode | cstring may be nil |
HOUSING_LAYOUT_OCCUPIED_FLOOR_RANGE_CHANGED
lowestFloor | number | |
|---|---|---|
highestFloor | number |
HOUSING_LAYOUT_PIN_FRAME_ADDED
pinFrame | HousingLayoutPinFrame |
|---|
HOUSING_LAYOUT_PIN_FRAME_RELEASED
pinFrame | HousingLayoutPinFrame |
|---|
HOUSING_LAYOUT_PIN_FRAMES_RELEASED
No payload.
HOUSING_LAYOUT_ROOM_COMPONENT_THEME_SET_CHANGED
roomGUID | WOWGUID | |
|---|---|---|
componentID | number | |
newThemeSet | number | |
result | HousingResult |
HOUSING_LAYOUT_ROOM_MOVE_INVALID
No payload.
HOUSING_LAYOUT_ROOM_MOVED
Fired when a previously placed room has been moved to a different position or rotation
No payload.
HOUSING_LAYOUT_ROOM_RECEIVED
Fired when info for a newly placed room has been recieved while in Layout Mode
playAddedSound | bool |
|---|
HOUSING_LAYOUT_ROOM_REMOVED
Fired when a previously placed room has been removed while in Layout Mode
No payload.
HOUSING_LAYOUT_ROOM_RETURNED
Fired when a room that was being dragged is let go of without being placed, and is returned to the House Chest
No payload.
HOUSING_LAYOUT_ROOM_SELECTION_CHANGED
Fired when an already placed room has been selected or deselected
hasSelection | bool |
|---|
HOUSING_LAYOUT_ROOM_SNAPPED
Fired when a room being dragged has been snapped to a particular door connection
No payload.
HOUSING_LAYOUT_VIEWED_FLOOR_CHANGED
floor | number |
|---|
SHOW_STAIR_DIRECTION_CONFIRMATION
No payload.