Core/Bags: cleanup random tab. check for item in bag slots for getitembyguid and getitemcountwithlimitcategory
This commit is contained in:
@@ -10198,7 +10198,7 @@ uint32 Player::GetItemCountWithLimitCategory(uint32 limitCategory, Item* skipIte
|
|||||||
if (Bag* pBag = GetBagByPos(i))
|
if (Bag* pBag = GetBagByPos(i))
|
||||||
count += pBag->GetItemCountWithLimitCategory(limitCategory, skipItem);
|
count += pBag->GetItemCountWithLimitCategory(limitCategory, skipItem);
|
||||||
|
|
||||||
for (int i = BANK_SLOT_ITEM_START; i < BANK_SLOT_ITEM_END; ++i)
|
for (int 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)
|
if (pItem != skipItem)
|
||||||
if (ItemTemplate const* pProto = pItem->GetTemplate())
|
if (ItemTemplate const* pProto = pItem->GetTemplate())
|
||||||
@@ -10224,7 +10224,7 @@ Item* Player::GetItemByGuid(uint64 guid) const
|
|||||||
if (pItem->GetGUID() == guid)
|
if (pItem->GetGUID() == guid)
|
||||||
return pItem;
|
return pItem;
|
||||||
|
|
||||||
for (int i = BANK_SLOT_ITEM_START; i < BANK_SLOT_ITEM_END; ++i)
|
for (int 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->GetGUID() == guid)
|
if (pItem->GetGUID() == guid)
|
||||||
return pItem;
|
return pItem;
|
||||||
@@ -16386,7 +16386,7 @@ void Player::ReputationChanged2(FactionEntry const* factionEntry)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Player::HasQuestForItem(uint32 itemid) const
|
bool Player::HasQuestForItem(uint32 itemid) const
|
||||||
{
|
{
|
||||||
for (uint8 i = 0; i < MAX_QUEST_LOG_SIZE; ++i)
|
for (uint8 i = 0; i < MAX_QUEST_LOG_SIZE; ++i)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user