Fix a crash related to bags (infinite recursive call). closes #581

--HG--
branch : trunk
This commit is contained in:
spp
2009-12-06 16:49:17 +01:00
parent 83185d16a0
commit 98e9c42113
+2 -2
View File
@@ -157,11 +157,11 @@ void Bag::RemoveItem( uint8 slot, bool /*update*/ )
SetUInt64Value( CONTAINER_FIELD_SLOT_1 + (slot * 2), 0 );
}
void Bag::StoreItem( uint8 slot, Item *pItem, bool /*update*/ )
void Bag::StoreItem(uint8 slot, Item *pItem, bool /*update*/)
{
assert(slot < MAX_BAG_SIZE);
if( pItem )
if (pItem && pItem->GetGUID() != this->GetGUID())
{
m_bagslot[slot] = pItem;
SetUInt64Value(CONTAINER_FIELD_SLOT_1 + (slot * 2), pItem->GetGUID());