1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-01 00:27:44 +00:00

Fixed an inventory bug to to invalid size

This commit is contained in:
Mordred 2018-03-04 00:12:33 +01:00
parent 76967fe990
commit 3747b89b67
2 changed files with 3 additions and 3 deletions

View file

@ -723,7 +723,7 @@ bool Core::Inventory::load()
while( bagRes->next() )
{
uint16_t storageId = bagRes->getUInt16( 1 );
for( uint32_t i = 1; i <= 25; i++ )
for( uint32_t i = 1; i <= 35; i++ )
{
uint64_t uItemId = bagRes->getUInt64( i + 1 );
if( uItemId == 0 )
@ -893,7 +893,7 @@ uint8_t Core::Inventory::getFreeSlotsInBags()
uint8_t slots = 0;
for( uint8_t container : { 0, 1, 2, 3 } )
{
slots += 25 - m_inventoryMap[container]->getEntryCount();
slots += 34 - m_inventoryMap[container]->getEntryCount();
}
return slots;
}

View file

@ -14,7 +14,7 @@ extern Core::Logger g_log;
Core::ItemContainer::ItemContainer( uint16_t locationId ) :
m_id( locationId ),
m_size( 25 )
m_size( 35 )
{
}