Core/Player: Modify GetItemByEntry to include Currency.
This commit is contained in:
@@ -12933,6 +12933,11 @@ Item* Player::GetItemByEntry(uint32 entry) const
|
|||||||
if (pItem->GetEntry() == entry)
|
if (pItem->GetEntry() == entry)
|
||||||
return pItem;
|
return pItem;
|
||||||
|
|
||||||
|
for (uint8 i = KEYRING_SLOT_START; i < CURRENCYTOKEN_SLOT_END; ++i)
|
||||||
|
if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i))
|
||||||
|
if (pItem->GetEntry() == entry)
|
||||||
|
return pItem;
|
||||||
|
|
||||||
for (int i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; ++i)
|
for (int i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; ++i)
|
||||||
if (Bag* pBag = GetBagByPos(i))
|
if (Bag* pBag = GetBagByPos(i))
|
||||||
for (uint32 j = 0; j < pBag->GetBagSize(); ++j)
|
for (uint32 j = 0; j < pBag->GetBagSize(); ++j)
|
||||||
|
|||||||
Reference in New Issue
Block a user