mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[10151] Prevent autostoring not empty bags
Thanks to The_Game_Master for detailed information about the bug.
This commit is contained in:
parent
59871ac550
commit
091b69500d
2 changed files with 5 additions and 1 deletions
|
|
@ -9925,6 +9925,10 @@ uint8 Player::_CanStoreItem( uint8 bag, uint8 slot, ItemPosCountVec &dest, uint3
|
|||
}
|
||||
}
|
||||
|
||||
// Normally it would be impossible to autostore not empty bags
|
||||
if(pItem->IsBag() && !((Bag*)pItem)->IsEmpty())
|
||||
return EQUIP_ERR_NONEMPTY_BAG_OVER_OTHER_BAG;
|
||||
|
||||
// search free slot
|
||||
res = _CanStoreItem_InInventorySlots(INVENTORY_SLOT_ITEM_START,INVENTORY_SLOT_ITEM_END,dest,pProto,count,false,pItem,bag,slot);
|
||||
if (res!=EQUIP_ERR_OK)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue