1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-30 08:07:46 +00:00

correctly load appearance from db

This commit is contained in:
NotAdam 2018-12-22 17:25:30 +11:00
parent ca62581dfb
commit c345ac2c4e
2 changed files with 11 additions and 11 deletions

View file

@ -633,19 +633,19 @@ void Sapphire::World::Manager::HousingMgr::sendEstateInventory( Entity::Player&
}
const Sapphire::World::Manager::HousingMgr::LandSetLandCacheMap&
Sapphire::World::Manager::HousingMgr::getLandCacheMap() const
Sapphire::World::Manager::HousingMgr::getLandCacheMap()
{
return m_landCache;
}
Sapphire::World::Manager::HousingMgr::LandIdentToInventoryContainerMap
Sapphire::World::Manager::HousingMgr::getEstateInventories() const
Sapphire::World::Manager::HousingMgr::LandIdentToInventoryContainerMap&
Sapphire::World::Manager::HousingMgr::getEstateInventories()
{
return m_estateInventories;
}
Sapphire::World::Manager::HousingMgr::ContainerIdToContainerMap
Sapphire::World::Manager::HousingMgr::getEstateInventory( uint64_t ident ) const
Sapphire::World::Manager::HousingMgr::ContainerIdToContainerMap&
Sapphire::World::Manager::HousingMgr::getEstateInventory( uint64_t ident )
{
auto map = m_estateInventories.find( ident );
@ -654,8 +654,8 @@ Sapphire::World::Manager::HousingMgr::ContainerIdToContainerMap
return map->second;
}
Sapphire::World::Manager::HousingMgr::ContainerIdToContainerMap
Sapphire::World::Manager::HousingMgr::getEstateInventory( Sapphire::Common::LandIdent ident ) const
Sapphire::World::Manager::HousingMgr::ContainerIdToContainerMap&
Sapphire::World::Manager::HousingMgr::getEstateInventory( Sapphire::Common::LandIdent ident )
{
auto u64ident = *reinterpret_cast< uint64_t* >( &ident );

View file

@ -110,27 +110,27 @@ namespace Sapphire::World::Manager
* @brief Get the land & house data that was cached on world startup.
* @return
*/
const LandSetLandCacheMap& getLandCacheMap() const;
const LandSetLandCacheMap& getLandCacheMap();
/*!
* @brief Get all loaded inventories for housing estates
* @return
*/
LandIdentToInventoryContainerMap getEstateInventories() const;
LandIdentToInventoryContainerMap& getEstateInventories();
/*!
* @brief Get an estate inventory for a specific estate
* @param ident LandIdent for the specified estate
* @return A map containing container ids to ItemContainerPtr
*/
ContainerIdToContainerMap getEstateInventory( uint64_t ident ) const;
ContainerIdToContainerMap& getEstateInventory( uint64_t ident );
/*!
* @brief Get an estate inventory for a specific estate
* @param ident LandIdent for the specified estate
* @return A map containing container ids to ItemContainerPtr
*/
ContainerIdToContainerMap getEstateInventory( Common::LandIdent ident ) const;
ContainerIdToContainerMap& getEstateInventory( Common::LandIdent ident );
private:
void loadLandCache();
bool loadEstateInventories();