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:
@@ -10157,7 +10157,8 @@ uint32 Player::GetItemCount(uint32 item, bool inBankAlso, Item* skipItem) const
|
|||||||
|
|
||||||
if (inBankAlso)
|
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 (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i))
|
||||||
if (pItem != skipItem && pItem->GetEntry() == item)
|
if (pItem != skipItem && pItem->GetEntry() == item)
|
||||||
count += pItem->GetCount();
|
count += pItem->GetCount();
|
||||||
|
|||||||
Reference in New Issue
Block a user