mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 10:26:28 +01:00
*Update to Mangos 7072.
*Remove some duplicated functions of possess. --HG-- branch : trunk
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user