AgentSkillsCN

wow-api-housing

WoW Retail玩家住房API的完整参考(12.0.0补丁新增功能)。涵盖住房UI(核心住房系统)、C_HouseEditorUI(放置/编辑模式)、C_HousingCatalog(装饰目录)、住房基础模式UI、住房清理模式UI、住房自定义模式UI、住房装饰UI、住房专家模式UI、C_HouseExteriorUI(外部自定义)、住房布局UI、C_HousingNeighborhood(街区/探访功能)、C_NeighborhoodInitiative(社区目标),以及CatalogShop。当您需要处理玩家住房的放置、装饰、编辑模式、街区、住房目录、外部自定义,或社区倡议时,此功能将为您提供全面支持。

SKILL.md
--- frontmatter
name: wow-api-housing
description: "Complete reference for WoW Retail Player Housing APIs (new in Patch 12.0.0). Covers HousingUI (core housing system), C_HouseEditorUI (placement/editing modes), C_HousingCatalog (decoration catalog), HousingBasicModeUI, HousingCleanupModeUI, HousingCustomizeModeUI, HousingDecorUI, HousingExpertModeUI, C_HouseExteriorUI (exterior customization), HousingLayoutUI, C_HousingNeighborhood (neighborhoods/visiting), C_NeighborhoodInitiative (community goals), and CatalogShop. Use when working with player housing placement, decoration, editing modes, neighborhoods, housing catalogs, exterior customization, or neighborhood initiatives."

Housing API (Retail — Patch 12.0.0)

Comprehensive reference for the player housing system, brand new in Patch 12.0.0.

Source: https://warcraft.wiki.gg/wiki/World_of_Warcraft_API Current as of: Patch 12.0.0 (Build 65655) — January 28, 2026 Scope: Retail only. This entire system is new in 12.0.0.


Scope

  • HousingUI — Core housing system frame and state
  • C_HouseEditorUI — Placement and editing (position, rotate, scale)
  • C_HousingCatalog — Decoration catalog browsing
  • HousingBasicModeUI — Simplified placement mode
  • HousingCleanupModeUI — Bulk cleanup/removal mode
  • HousingCustomizeModeUI — Customization mode
  • HousingDecorUI — Decoration management
  • HousingExpertModeUI — Advanced/expert placement
  • C_HouseExteriorUI — Exterior appearance customization
  • HousingLayoutUI — Layout save/load
  • C_HousingNeighborhood — Neighborhoods and visiting
  • C_NeighborhoodInitiative — Community initiative goals
  • CatalogShop — Housing shop/catalog purchase system

HousingUI — Core Housing System

FunctionReturnsDescription
HousingUI.IsHousingModeActive()isActiveIs housing editing active?
HousingUI.EnterHousingMode()Enter housing edit mode
HousingUI.ExitHousingMode()Exit housing edit mode
HousingUI.GetCurrentHouseInfo()houseInfoCurrent house data
HousingUI.GetHouseOwner()ownerInfoHouse owner info
HousingUI.IsPlayerInOwnHouse()isOwnIn own house?
HousingUI.IsPlayerInHouse()inHouseIn any house?
HousingUI.GetHousingPlotInfo()plotInfoPlot/lot info

C_HouseEditorUI — Placement & Editing

The editor is the core system for placing, moving, rotating, and scaling decorations.

Object Selection & Manipulation

FunctionReturnsDescription
C_HouseEditorUI.SelectObject(objectID)Select decoration
C_HouseEditorUI.DeselectObject()Deselect current
C_HouseEditorUI.GetSelectedObject()objectInfoCurrent selection
C_HouseEditorUI.DeleteSelectedObject()Delete selection
C_HouseEditorUI.MoveObject(objectID, x, y, z)Move decoration
C_HouseEditorUI.RotateObject(objectID, yaw, pitch, roll)Rotate decoration
C_HouseEditorUI.ScaleObject(objectID, scale)Scale decoration
C_HouseEditorUI.GetObjectPosition(objectID)x, y, zObject position
C_HouseEditorUI.GetObjectRotation(objectID)yaw, pitch, rollObject rotation
C_HouseEditorUI.GetObjectScale(objectID)scaleObject scale

Placement

FunctionReturnsDescription
C_HouseEditorUI.PlaceObject(catalogItemID)Start placing item
C_HouseEditorUI.ConfirmPlacement()Confirm current placement
C_HouseEditorUI.CancelPlacement()Cancel placement
C_HouseEditorUI.IsPlacing()isPlacingIn placement mode?
C_HouseEditorUI.GetPlacedObjects()objectsAll placed objects
C_HouseEditorUI.GetPlacementLimits()current, maxDecoration limits

Undo/Redo

FunctionReturnsDescription
C_HouseEditorUI.Undo()Undo last action
C_HouseEditorUI.Redo()Redo last undo
C_HouseEditorUI.CanUndo()canUndoHas undo?
C_HouseEditorUI.CanRedo()canRedoHas redo?

C_HousingCatalog — Decoration Catalog

FunctionReturnsDescription
C_HousingCatalog.GetCategories()categoriesAll categories
C_HousingCatalog.GetCategoryInfo(categoryID)categoryInfoCategory details
C_HousingCatalog.GetItemsInCategory(categoryID)itemsItems in category
C_HousingCatalog.GetItemInfo(catalogItemID)itemInfoCatalog item info
C_HousingCatalog.GetOwnedItems()ownedItemsPlayer's owned items
C_HousingCatalog.IsItemOwned(catalogItemID)isOwnedPlayer owns item?
C_HousingCatalog.GetItemCount(catalogItemID)countHow many owned
C_HousingCatalog.SearchCatalog(searchText)resultsSearch items
C_HousingCatalog.GetFilteredItems(filters)itemsFilter items

HousingBasicModeUI — Simplified Mode

FunctionReturnsDescription
HousingBasicModeUI.EnterBasicMode()Enter basic edit mode
HousingBasicModeUI.ExitBasicMode()Exit basic mode
HousingBasicModeUI.IsInBasicMode()isBasicIn basic mode?

HousingCleanupModeUI — Cleanup Mode

FunctionReturnsDescription
HousingCleanupModeUI.EnterCleanupMode()Enter cleanup mode
HousingCleanupModeUI.ExitCleanupMode()Exit cleanup mode
HousingCleanupModeUI.SelectForCleanup(objectID)Tag for cleanup
HousingCleanupModeUI.ConfirmCleanup()Execute cleanup
HousingCleanupModeUI.GetCleanupCount()countItems tagged

HousingCustomizeModeUI — Customization

FunctionReturnsDescription
HousingCustomizeModeUI.EnterCustomizeMode()Enter customize mode
HousingCustomizeModeUI.ExitCustomizeMode()Exit customize mode
HousingCustomizeModeUI.GetCustomizationOptions(objectID)optionsObject options
HousingCustomizeModeUI.ApplyCustomization(objectID, optionID)Apply option

HousingDecorUI — Decoration Management

FunctionReturnsDescription
HousingDecorUI.GetDecorInventory()inventoryStored decorations
HousingDecorUI.GetDecorInfo(decorID)decorInfoDecoration details
HousingDecorUI.StoreDecoration(objectID)Store placed item
HousingDecorUI.GetDecorCategories()categoriesInventory categories

HousingExpertModeUI — Expert Placement

FunctionReturnsDescription
HousingExpertModeUI.EnterExpertMode()Enter expert mode
HousingExpertModeUI.ExitExpertMode()Exit expert mode
HousingExpertModeUI.IsInExpertMode()isExpertIn expert mode?
HousingExpertModeUI.SetSnapping(enabled)Toggle grid snap
HousingExpertModeUI.GetSnapping()enabledSnap enabled?
HousingExpertModeUI.SetPrecisionMode(enabled)Toggle precision
HousingExpertModeUI.GetPrecisionMode()enabledPrecision on?

C_HouseExteriorUI — Exterior Customization

FunctionReturnsDescription
C_HouseExteriorUI.GetExteriorOptions()optionsAvailable exteriors
C_HouseExteriorUI.GetCurrentExterior()exteriorInfoCurrent exterior
C_HouseExteriorUI.SetExterior(exteriorID)Change exterior
C_HouseExteriorUI.PreviewExterior(exteriorID)Preview exterior
C_HouseExteriorUI.GetExteriorCategories()categoriesExterior categories

HousingLayoutUI — Layout Save/Load

FunctionReturnsDescription
HousingLayoutUI.GetSavedLayouts()layoutsSaved layouts
HousingLayoutUI.SaveLayout(name)Save current layout
HousingLayoutUI.LoadLayout(layoutID)Load layout
HousingLayoutUI.DeleteLayout(layoutID)Delete layout
HousingLayoutUI.RenameLayout(layoutID, name)Rename layout
HousingLayoutUI.GetLayoutInfo(layoutID)layoutInfoLayout details

C_HousingNeighborhood — Neighborhoods

FunctionReturnsDescription
C_HousingNeighborhood.GetNeighborhoodInfo()neighborhoodInfoCurrent neighborhood
C_HousingNeighborhood.GetNeighbors()neighborsNeighbor list
C_HousingNeighborhood.GetNeighborInfo(neighborID)neighborInfoNeighbor details
C_HousingNeighborhood.VisitNeighbor(neighborID)Visit a neighbor
C_HousingNeighborhood.GetVisitableHouses()housesVisitable houses
C_HousingNeighborhood.InviteToNeighborhood(playerName)Invite player
C_HousingNeighborhood.LeaveNeighborhood()Leave neighborhood
C_HousingNeighborhood.GetNeighborhoodMembers()membersAll members

C_NeighborhoodInitiative — Community Goals

FunctionReturnsDescription
C_NeighborhoodInitiative.GetCurrentInitiative()initiativeInfoActive initiative
C_NeighborhoodInitiative.GetInitiativeProgress()progressCurrent progress
C_NeighborhoodInitiative.GetInitiativeRewards()rewardsInitiative rewards
C_NeighborhoodInitiative.GetPlayerContribution()contributionPlayer's contribution
C_NeighborhoodInitiative.GetInitiativeHistory()historyPast initiatives

CatalogShop — Housing Store

FunctionReturnsDescription
CatalogShop.GetShopCategories()categoriesShop categories
CatalogShop.GetShopItems(categoryID)itemsItems for sale
CatalogShop.GetShopItemInfo(shopItemID)itemInfoItem details
CatalogShop.PurchaseItem(shopItemID)Purchase item
CatalogShop.CanPurchase(shopItemID)canBuy, reasonCan purchase?
CatalogShop.GetBundleInfo(bundleID)bundleInfoBundle details

Common Patterns

Check If Player Is Home

lua
local function CheckHousingState()
    if HousingUI.IsPlayerInOwnHouse() then
        print("Welcome home!")
        local houseInfo = HousingUI.GetCurrentHouseInfo()
        if houseInfo then
            print("House:", houseInfo.name)
        end
    elseif HousingUI.IsPlayerInHouse() then
        local owner = HousingUI.GetHouseOwner()
        if owner then
            print("Visiting", owner.name, "'s house")
        end
    end
end

Place a Decoration

lua
-- Enter housing edit mode and place an item
local function PlaceDecoration(catalogItemID)
    if not HousingUI.IsHousingModeActive() then
        HousingUI.EnterHousingMode()
    end
    
    local current, max = C_HouseEditorUI.GetPlacementLimits()
    if current >= max then
        print("Decoration limit reached:", current, "/", max)
        return
    end
    
    C_HouseEditorUI.PlaceObject(catalogItemID)
end

Browse Catalog

lua
local function BrowseCatalog()
    local categories = C_HousingCatalog.GetCategories()
    for _, cat in ipairs(categories) do
        local catInfo = C_HousingCatalog.GetCategoryInfo(cat)
        if catInfo then
            print("Category:", catInfo.name)
            local items = C_HousingCatalog.GetItemsInCategory(cat)
            for _, item in ipairs(items) do
                local info = C_HousingCatalog.GetItemInfo(item)
                if info then
                    local owned = C_HousingCatalog.IsItemOwned(item)
                    print("  -", info.name, owned and "(Owned)" or "")
                end
            end
        end
    end
end

Save and Load Layouts

lua
-- Save current decoration layout
HousingLayoutUI.SaveLayout("My Living Room v2")

-- List saved layouts
local layouts = HousingLayoutUI.GetSavedLayouts()
for _, layout in ipairs(layouts) do
    local info = HousingLayoutUI.GetLayoutInfo(layout)
    if info then
        print(info.name, "-", info.objectCount, "objects")
    end
end

Key Events

EventPayloadDescription
HOUSING_MODE_ENTEREDEntered housing edit mode
HOUSING_MODE_EXITEDExited housing edit mode
HOUSING_OBJECT_PLACEDobjectIDDecoration placed
HOUSING_OBJECT_REMOVEDobjectIDDecoration removed
HOUSING_OBJECT_MOVEDobjectIDDecoration moved
HOUSING_OBJECT_SELECTEDobjectIDObject selected
HOUSING_OBJECT_DESELECTEDObject deselected
HOUSING_PLACEMENT_STARTEDcatalogItemIDPlacement mode started
HOUSING_PLACEMENT_CONFIRMEDobjectIDPlacement confirmed
HOUSING_PLACEMENT_CANCELEDPlacement canceled
HOUSING_CATALOG_UPDATEDCatalog data changed
HOUSING_LAYOUT_SAVEDlayoutIDLayout saved
HOUSING_LAYOUT_LOADEDlayoutIDLayout loaded
HOUSING_EXTERIOR_CHANGEDexteriorIDExterior changed
HOUSING_LIMIT_UPDATEDcurrent, maxLimit changed
HOUSING_ENTERED_HOUSEhouseInfoEntered a house
HOUSING_LEFT_HOUSELeft a house
NEIGHBORHOOD_INITIATIVE_UPDATEInitiative progress changed
NEIGHBORHOOD_MEMBER_JOINEDmemberInfoNew neighbor

Gotchas & Restrictions

  1. 12.0.0 only — The entire housing system is new in Patch 12.0.0. APIs may evolve in subsequent patches.
  2. Mode requirements — Must call HousingUI.EnterHousingMode() before using editor functions.
  3. Placement limits — Each house has a decoration cap. Check with GetPlacementLimits().
  4. Expert vs Basic mode — Expert mode allows full 3D positioning; basic mode uses simplified snapping.
  5. Own house only for editing — Cannot edit decorations in someone else's house.
  6. Layout compatibility — Layouts may not load correctly if decorations have been removed from the game.
  7. Neighborhood initiatives — Shared community goals; progress is collective, not individual.
  8. Hardware events — Purchasing catalog items requires user interaction (hardware clicks).