mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[11227] Fixed item search by guid in bank item slots.
This commit is contained in:
parent
275928e504
commit
ad6ab0bc49
2 changed files with 6 additions and 1 deletions
|
|
@ -9148,6 +9148,11 @@ Item* Player::GetItemByGuid(ObjectGuid guid) const
|
|||
if (pItem->GetObjectGuid() == 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->GetObjectGuid() == guid)
|
||||
return pItem;
|
||||
|
||||
for(int i = BANK_SLOT_BAG_START; i < BANK_SLOT_BAG_END; ++i)
|
||||
if (Bag *pBag = (Bag*)GetItemByPos(INVENTORY_SLOT_BAG_0, i))
|
||||
for(uint32 j = 0; j < pBag->GetBagSize(); ++j)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue