Retail packet sniff analysis proves that ALL housing plots use a single
Cornerstone GameObject (entry 457142, DisplayID 110660, Type 48/UILink)
with GOState toggling to communicate ownership:
- GOState 0 (ACTIVE) = For Sale / unoccupied
- GOState 1 (READY) = Owned / occupied
- All Cornerstones have Flags=32 (GO_FLAG_NODESPAWN)
The previous implementation spawned a fabricated "For Sale" sign
(entry 417487, DisplayID 8206) for unoccupied plots. DisplayID 8206 is
a vanilla-era model that renders as a flat brown rectangle.
Changes:
- SpawnPlotGameObjects: Always use CornerstoneGameObjectID, set GOState
based on ownership, apply GO_FLAG_NODESPAWN
- Replace SwapPlotGameObject (destroy/recreate) with SetPlotOwnershipState
(GOState toggle on existing Cornerstone)
- Simplify all 3 callers (ReservePlot, BuyHouse, EvictPlot) to pass
bool ownership instead of GO entry IDs
- Remove fabricated entry 417487 from world SQL
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
Adds exteriorLocked, houseSize, and houseType columns to existing
character_housing tables via ALTER TABLE (the schema file was updated
in the prior commit but existing databases need this migration).
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
The 'maps' logger is at WARNING level by default, suppressing
all DEBUG messages. Route HousingMap and MapManager neighborhood
logging to the 'housing' channel which is at TRACE level and
writes to Housing.log.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
Creature templates, spawns, models, gameobject templates, spawns,
gossip menus, vendor inventories, quest data, and trainer spells
for the Alliance housing neighborhood (The Aerie).
Column names adapted to current TrinityCore creature_template schema
(type/family/Classification, 64-bit npcflag).
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
Track plot GameObjects in HousingMap so for-sale-signs can be swapped
to cornerstones on purchase and reverted on eviction. Previously the
visual GO never changed after PurchasePlot(), leaving stale for-sale
signs on owned plots.
Fix HouseFinder neighborhood detail to show all 55 DB2 plots with
availability and cost instead of only listing occupied plots, so the
client can render the full plot grid.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
Wire format fixes:
- Split HouseStatusResponse.Status (uint32) into HouseStatus/PlotIndex/StatusFlags sub-fields
- Rename ResidentEntry.PlotIndex to StatusFlags (carries flag data, not plot index)
- Rename NeighborhoodPlayerEnterPlot.PlayerGuid to PlotAreaTriggerGuid (sends AT GUID)
Data structure optimization:
- Convert Neighborhood._plots from vector to fixed array<55> for O(1) plot access
- Add PlotInfo.IsOccupied() sentinel check, GetOccupiedPlotCount() helper
- Update all 8 callers across handlers, managers, and Player mirror data sync
Roster enhancement:
- Add HouseGuid as first field in roster member wire format (before PlayerGuid)
- Populate from plot data in both handler and Player roster builders
AreaTrigger integration:
- Add AreaTrigger::CreateStaticAreaTrigger() factory for non-caster ATs
- Add AreaTrigger::InitHousingPlotData() for HousingPlotAreaTriggerData fragment
- Spawn plot AreaTriggers (entry 37358) at HousePosition in HousingMap::LoadGridObjects
- Add SQL for areatrigger_create_properties (sphere, 40yd radius)
Plot aura system:
- Add at_housing_plot AreaTriggerAI script for plot enter/exit detection
- Apply own-plot aura (1266699) or visiting-plot aura (1239847) on AT enter
- Send SMSG_NEIGHBORHOOD_PLAYER_ENTER/LEAVE_PLOT packets
Multi-house architecture:
- Replace single _housing with vector<unique_ptr<Housing>> _housings
- Context-aware GetHousing() resolves via current HousingMap neighborhood
- Add GetHousingForNeighborhood(), GetAllHousings(), updated CreateHousing/DeleteHousing
- Update all handlers and HousingMap for multi-house semantics
* Fix initializing skill slots after they were increased from 256 to 300
* Improve skill step detection during loading from db
* Add safeguard for invalid data saved in character_skill (value = 0)
Signed-off-by: luis <[email protected]>
Route housing maps (2735/2736) to per-neighborhood instances instead of
falling through to shared world map path. This connects the existing
HousingMgr/NeighborhoodMgr backend to the actual map creation pipeline.
- Add MapEntry::IsNeighborhood() for MAP_HOUSE_NEIGHBORHOOD detection
- Add MapManager::CreateHousing() factory and housing branch in
CreateMap()/FindInstanceIdForPlayer() with auto-assignment via
FindOrCreateTutorialNeighborhood()
- Fix HousingMap GUID mismatch (HighGuid::Uniq -> HighGuid::Housing)
so LoadNeighborhoodData() resolves the neighborhood pointer correctly
- Make housing maps persistent (m_unloadTimer=0)
- Add AddPlayerToMap/RemovePlayerFromMap overrides for resident tracking
- Implement LoadGridObjects to dynamically spawn For Sale Sign (417487)
on empty plots and Cornerstone (457142) on owned plots
- Fix HandleNeighborhoodOpenCornerstoneUI stub with real neighborhood/
plot data lookup by matching cornerstone GO position to plot index
- Add 50% occupation expansion: auto-create new public neighborhoods
when all existing ones for a faction reach 28/55 plots occupied
- Replace hardcoded neighborhood names with GenerateNeighborhoodName()
- Remove static cornerstone SQL spawns (now dynamic per-neighborhood)
The GAMEOBJECT_TYPE_UI_LINK handler only mapped UILinkType values 0-3
to PlayerInteractionType via a hardcoded switch. UILinkType is deprecated
in favor of the PlayerInteractionType field (Data[7]) which allows
direct mapping to any PlayerInteractionType enum value.
When PlayerInteractionType (Data[7]) is set, send
SMSG_NPC_INTERACTION_OPEN_RESULT with the GO's GUID and the specified
interaction type. Also cast UILink.spell (Data[8]) when present, which
is required for interactions like Cornerstones that need a placement
spell to trigger the client UI.
Fixes Cornerstones (Data[7]=70, spell 1266097) and Bulletin Boards
(Data[7]=72) not opening their respective housing UIs.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>