Core/Misc: fix item search by guid in bank item slots.
This commit is contained in:
@@ -9996,6 +9996,11 @@ Item* Player::GetItemByGuid(uint64 guid) const
|
||||
if (pItem->GetGUID() == guid)
|
||||
return pItem;
|
||||
|
||||
for(int i = BANK_SLOT_ITEM_START; i < BANK_SLOT_ITEM_END; ++i)
|
||||
if (Item *pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i))
|
||||
if (pItem->GetGUID() == guid)
|
||||
return pItem;
|
||||
|
||||
for (uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; ++i)
|
||||
if (Bag *pBag = (Bag*)GetItemByPos(INVENTORY_SLOT_BAG_0, i))
|
||||
for (uint32 j = 0; j < pBag->GetBagSize(); ++j)
|
||||
|
||||
Reference in New Issue
Block a user