*Fix a bug of checking bags which can store items. Backported from TC2. Thanks to Iskander for pointing out the bug.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-03-13 14:57:42 -06:00
parent f0ad9ee232
commit 5ea92ebb12
+6
View File
@@ -9657,6 +9657,12 @@ uint8 Player::CanStoreItems( Item **pItems,int count) const
pBag = (Bag*)GetItemByPos( INVENTORY_SLOT_BAG_0, t );
if( pBag )
{
pBagProto = pBag->GetProto();
// special bag already checked
if( pBagProto && (pBagProto->Class != ITEM_CLASS_CONTAINER || pBagProto->SubClass != ITEM_SUBCLASS_CONTAINER))
continue;
for(uint32 j = 0; j < pBag->GetBagSize(); j++)
{
if( inv_bags[t-INVENTORY_SLOT_BAG_START][j] == 0 )