[10151] Prevent autostoring not empty bags

Thanks to The_Game_Master for detailed information about the bug.
This commit is contained in:
Lightguard 2010-07-04 22:39:24 +02:00
parent 59871ac550
commit 091b69500d
2 changed files with 5 additions and 1 deletions

View file

@ -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)