diff --git a/src/world/Actor/PlayerInventory.cpp b/src/world/Actor/PlayerInventory.cpp index 850c45e2..95bd52fb 100644 --- a/src/world/Actor/PlayerInventory.cpp +++ b/src/world/Actor/PlayerInventory.cpp @@ -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 ); + } \ No newline at end of file diff --git a/src/world/Manager/HousingMgr.cpp b/src/world/Manager/HousingMgr.cpp index 7d47d347..7e576b4e 100644 --- a/src/world/Manager/HousingMgr.cpp +++ b/src/world/Manager/HousingMgr.cpp @@ -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;