mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-25 14:07:46 +00:00
WiP Fix house inventory not working, added debug print for item inventory size mismatch.
This commit is contained in:
parent
e7bc21a1f2
commit
8565ad1cd5
3 changed files with 8 additions and 4 deletions
|
@ -92,7 +92,10 @@ Sapphire::ItemPtr Sapphire::ItemContainer::getItem( uint16_t slotId )
|
|||
void Sapphire::ItemContainer::setItem( uint16_t slotId, ItemPtr pItem )
|
||||
{
|
||||
if( slotId > m_size )
|
||||
{
|
||||
Logger::error( "Unable to place item {}, {} exceeds max size of {}", pItem->getId(), slotId, m_size );
|
||||
return;
|
||||
}
|
||||
|
||||
m_itemMap[ slotId ] = pItem;
|
||||
}
|
||||
|
|
|
@ -266,8 +266,8 @@ void HousingMgr::initLandCache()
|
|||
makeContainer( Common::InventoryType::HousingExteriorStoreroom, entry.m_maxPlacedExternalItems );
|
||||
|
||||
// fixed containers
|
||||
makeContainer( Common::InventoryType::HousingInteriorAppearance, 10 );
|
||||
makeContainer( Common::InventoryType::HousingExteriorAppearance, 9 );
|
||||
makeContainer( Common::InventoryType::HousingInteriorAppearance, 20 );
|
||||
makeContainer( Common::InventoryType::HousingExteriorAppearance, 20 );
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -702,6 +702,7 @@ void HousingMgr::buildPresetEstate( Entity::Player& player, HousingZone& zone, u
|
|||
if( !initHouseModels( player, pLand, presetCatalogId ) )
|
||||
{
|
||||
pLand->setHouse( nullptr );
|
||||
Logger::error( "House failed building because of initHouseModels failed" );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -727,7 +728,7 @@ void HousingMgr::buildPresetEstate( Entity::Player& player, HousingZone& zone, u
|
|||
player.setLandFlags( Common::LandFlagsSlot::Private, Common::HOUSING_LAND_STATUS::HOUSING_LAND_STATUS_BUILDHOUSE, ident );
|
||||
player.sendLandFlagsSlot( Common::LandFlagsSlot::Private );
|
||||
|
||||
zone.registerEstateEntranceEObj( plotNum );
|
||||
//zone.registerEstateEntranceEObj( plotNum );
|
||||
}
|
||||
|
||||
void HousingMgr::requestEstateRename( Entity::Player& player, const Common::LandIdent ident )
|
||||
|
|
|
@ -299,7 +299,7 @@ Sapphire::Entity::EventObjectPtr Sapphire::HousingZone::registerEstateEntranceEO
|
|||
assert( land );
|
||||
|
||||
auto eObj = Entity::make_EventObject( getNextEObjId(), 2002737, 0, 0, 4, land->getMapMarkerPosition(), 0.f, "entrance", 0 );
|
||||
eObj->setHousingLink( landId << 8 );
|
||||
eObj->setHousingLink( static_cast< uint32_t >( landId ) << 8 );
|
||||
eObj->setScale( 1.f );
|
||||
|
||||
addEObj( eObj );
|
||||
|
|
Loading…
Add table
Reference in a new issue