Core/Bags: Do not allow multiple unique bags in bank bag slots

Existing multiple bags will be removed and items mailed
Kudos to micha
Closes #2786
This commit is contained in:
Nay
2012-05-23 21:25:50 +01:00
parent 741f3ac0e0
commit b1179d8f49
+2 -1
View File
@@ -10157,7 +10157,8 @@ uint32 Player::GetItemCount(uint32 item, bool inBankAlso, Item* skipItem) const
if (inBankAlso)
{
for (uint8 i = BANK_SLOT_ITEM_START; i < BANK_SLOT_ITEM_END; ++i)
// checking every item from 39 to 74 (including bank bags)
for (uint8 i = BANK_SLOT_ITEM_START; i < BANK_SLOT_BAG_END; ++i)
if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i))
if (pItem != skipItem && pItem->GetEntry() == item)
count += pItem->GetCount();