mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-27 06:47: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,
|
||||
const Sapphire::ItemPtr item )
|
||||
{
|
||||
auto& container = m_storageMap[ type ];
|
||||
container->setItem( slot, item );
|
||||
updateContainer( type, slot, item );
|
||||
|
||||
auto slotUpdate = std::make_shared< UpdateInventorySlotPacket >( getId(), slot, type, *item );
|
||||
queuePacket( slotUpdate );
|
||||
|
||||
}
|
|
@ -241,7 +241,7 @@ void Sapphire::World::Manager::HousingMgr::initLandCache()
|
|||
|
||||
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;
|
||||
|
@ -1358,7 +1358,7 @@ bool Sapphire::World::Manager::HousingMgr::removeInternalItem( Entity::Player& p
|
|||
player.insertInventoryItem( containerPair.first, containerPair.second, item );
|
||||
|
||||
// todo: set item as bound/unsellable/untradable
|
||||
|
||||
|
||||
// despawn
|
||||
auto arraySlot = ( containerIdx * 50 ) + slotId;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue