diff --git a/src/world/Manager/HousingMgr.cpp b/src/world/Manager/HousingMgr.cpp index f1c4c0f5..fd294cef 100644 --- a/src/world/Manager/HousingMgr.cpp +++ b/src/world/Manager/HousingMgr.cpp @@ -563,6 +563,8 @@ void Sapphire::World::Manager::HousingMgr::buildPresetEstate( Entity::Player& pl if( !initHouseModels( player, pLand, presetItem ) ) return; + createHouse( house ); + pLand->setState( HouseState::privateHouse ); pLand->setLandType( LandType::Private ); hZone->sendLandUpdate( plotNum ); diff --git a/src/world/Manager/HousingMgr.h b/src/world/Manager/HousingMgr.h index 6fcf53b7..82f01262 100644 --- a/src/world/Manager/HousingMgr.h +++ b/src/world/Manager/HousingMgr.h @@ -142,9 +142,17 @@ namespace Sapphire::World::Manager */ bool initHouseModels( Entity::Player& player, LandPtr land, uint32_t presetCatalogId ); + private: + + /*! + * @brief Creates a house and saves the minimum amount required to persist a house through restarts. + * + * Any other changes will be covered by the usual saving logic and can be safely ignored here. + * + * @param house The house to create in the house table + */ void createHouse( HousePtr house ) const; - private: /*! * @brief Gets the next available house id * @return The next available house id