*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:
@@ -9657,6 +9657,12 @@ uint8 Player::CanStoreItems( Item **pItems,int count) const
|
|||||||
pBag = (Bag*)GetItemByPos( INVENTORY_SLOT_BAG_0, t );
|
pBag = (Bag*)GetItemByPos( INVENTORY_SLOT_BAG_0, t );
|
||||||
if( pBag )
|
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++)
|
for(uint32 j = 0; j < pBag->GetBagSize(); j++)
|
||||||
{
|
{
|
||||||
if( inv_bags[t-INVENTORY_SLOT_BAG_START][j] == 0 )
|
if( inv_bags[t-INVENTORY_SLOT_BAG_START][j] == 0 )
|
||||||
|
|||||||
Reference in New Issue
Block a user