diff --git a/src/servers/Server_Zone/Actor/Player.h b/src/servers/Server_Zone/Actor/Player.h index 95fd1b89..7b08e911 100644 --- a/src/servers/Server_Zone/Actor/Player.h +++ b/src/servers/Server_Zone/Actor/Player.h @@ -197,9 +197,9 @@ public: // Inventory / Item / Currency ////////////////////////////////////////////////////////////////////////////////////////////////////// /*! add an item to the first free slot in one of the 4 main containers */ - bool tryAddItem( uint16_t catalogId, uint16_t quantity ); + bool tryAddItem( uint16_t catalogId, uint32_t quantity ); /*! add an item to a given container */ - bool addItem( uint16_t containerId, uint16_t catalogId, uint16_t quantity ); + bool addItem( uint16_t containerId, uint16_t catalogId, uint32_t quantity ); /*! equip an item to a specified slot */ void equipItem( Inventory::EquipSlot equipSlotId, ItemPtr pItem, bool sendModel ); /*! remove an item from an equipment slot */ diff --git a/src/servers/Server_Zone/Actor/PlayerInventory.cpp b/src/servers/Server_Zone/Actor/PlayerInventory.cpp index b5380d82..acc6632c 100644 --- a/src/servers/Server_Zone/Actor/PlayerInventory.cpp +++ b/src/servers/Server_Zone/Actor/PlayerInventory.cpp @@ -189,10 +189,10 @@ void Core::Entity::Player::removeCrystal( uint8_t type, uint32_t amount ) queuePacket( invUpPacket ); } -bool Core::Entity::Player::tryAddItem( uint16_t catalogId, uint16_t quantity ) +bool Core::Entity::Player::tryAddItem( uint16_t catalogId, uint32_t quantity ) { - for( uint8_t i = 0; i < 4; i++ ) + for( uint16_t i = 0; i < 4; i++ ) { if( m_pInventory->addItem( i, -1, catalogId, quantity ) != -1 ) { @@ -202,7 +202,7 @@ bool Core::Entity::Player::tryAddItem( uint16_t catalogId, uint16_t quantity ) return false; } -bool Core::Entity::Player::addItem( uint16_t containerId, uint16_t catalogId, uint16_t quantity ) +bool Core::Entity::Player::addItem( uint16_t containerId, uint16_t catalogId, uint32_t quantity ) { if( m_pInventory->addItem( containerId, -1, catalogId, quantity ) != -1 ) return true;