mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-06-10 09:47:46 +00:00
improve behaviour for creating items with correct max stack sizes
This commit is contained in:
parent
4385923129
commit
47f86e13c7
1 changed files with 1 additions and 4 deletions
|
@ -566,10 +566,7 @@ Core::ItemPtr Core::Entity::Player::createItem( uint32_t catalogId, uint16_t qua
|
|||
if( !itemInfo )
|
||||
return nullptr;
|
||||
|
||||
uint16_t itemAmount = quantity;
|
||||
|
||||
if( itemInfo->stackSize == 1 )
|
||||
itemAmount = 1;
|
||||
auto itemAmount = std::min< uint16_t >( quantity, static_cast< uint16_t >( itemInfo->stackSize ) );
|
||||
|
||||
if( !itemInfo )
|
||||
return nullptr;
|
||||
|
|
Loading…
Add table
Reference in a new issue