*Update to Mangos 7072.

*Remove some duplicated functions of possess.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-01-12 10:53:53 -06:00
parent 218f4c4c4b
commit 4daadd712f
22 changed files with 262 additions and 6960 deletions

View File

@@ -384,14 +384,22 @@ void WorldSession::DoLootRelease( uint64 lguid )
Item *pItem = player->GetItemByGuid(lguid );
if(!pItem)
return;
if( (pItem->GetProto()->BagFamily & BAG_FAMILY_MASK_MINING_SUPP) &&
pItem->GetProto()->Class == ITEM_CLASS_TRADE_GOODS &&
pItem->GetCount() >= 5)
ItemPrototype const* proto = pItem->GetProto();
// destroy only 5 items from stack in case prospecting and milling
if( (proto->BagFamily & (BAG_FAMILY_MASK_MINING_SUPP|BAG_FAMILY_MASK_HERBS)) &&
proto->Class == ITEM_CLASS_TRADE_GOODS)
{
pItem->m_lootGenerated = false;
pItem->loot.clear();
uint32 count = 5;
uint32 count = pItem->GetCount();
// >=5 checked in spell code, but will work for cheating cases also with removing from another stacks.
if(count > 5)
count = 5;
player->DestroyItemCount(pItem, count, true);
}
else