diff options
author | megamage <none@none> | 2009-03-13 14:57:42 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-03-13 14:57:42 -0600 |
commit | 5ea92ebb129fd868bcb5049616266b4d4db6f1f4 (patch) | |
tree | 5078faea7d520eff08c3d068e9d54b8296f28d5c /src | |
parent | f0ad9ee2329acc892dd29b31908894557dd6768b (diff) |
*Fix a bug of checking bags which can store items. Backported from TC2. Thanks to Iskander for pointing out the bug.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Player.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 6345a8d2d1f..3ed59445d88 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -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 ) |