mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-27 22:57:45 +00:00
fix removed housing items being orphaned after relogging
This commit is contained in:
parent
298b31512c
commit
3d9a90cbb7
2 changed files with 4 additions and 4 deletions
|
@ -930,9 +930,9 @@ bool Sapphire::Entity::Player::getFreeInventoryContainerSlot( Entity::Player::In
|
||||||
void Sapphire::Entity::Player::insertInventoryItem( Sapphire::Common::InventoryType type, uint16_t slot,
|
void Sapphire::Entity::Player::insertInventoryItem( Sapphire::Common::InventoryType type, uint16_t slot,
|
||||||
const Sapphire::ItemPtr item )
|
const Sapphire::ItemPtr item )
|
||||||
{
|
{
|
||||||
auto& container = m_storageMap[ type ];
|
updateContainer( type, slot, item );
|
||||||
container->setItem( slot, item );
|
|
||||||
|
|
||||||
auto slotUpdate = std::make_shared< UpdateInventorySlotPacket >( getId(), slot, type, *item );
|
auto slotUpdate = std::make_shared< UpdateInventorySlotPacket >( getId(), slot, type, *item );
|
||||||
queuePacket( slotUpdate );
|
queuePacket( slotUpdate );
|
||||||
|
|
||||||
}
|
}
|
|
@ -241,7 +241,7 @@ void Sapphire::World::Manager::HousingMgr::initLandCache()
|
||||||
|
|
||||||
auto makeContainer = [ &containers ]( Common::InventoryType type, uint16_t size )
|
auto makeContainer = [ &containers ]( Common::InventoryType type, uint16_t size )
|
||||||
{
|
{
|
||||||
containers[ type ] = make_ItemContainer( type, size, "houseiteminventory", false );
|
containers[ type ] = make_ItemContainer( type, size, "houseiteminventory", false, false );
|
||||||
};
|
};
|
||||||
|
|
||||||
uint16_t count = 0;
|
uint16_t count = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue