本文整理汇总了C++中GetBagSize函数的典型用法代码示例。如果您正苦于以下问题:C++ GetBagSize函数的具体用法?C++ GetBagSize怎么用?C++ GetBagSize使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetBagSize函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetFreeSlots
uint32 Bag::GetFreeSlots() const
{
uint32 slots = 0;
for (uint32 i = 0; i < GetBagSize(); ++i)
if (!m_bagslot[i])
++slots;
return slots;
}
示例2: GetSlotByItemGUID
uint8 Bag::GetSlotByItemGUID(ObjectGuid guid) const
{
for (uint32 i = 0; i < GetBagSize(); ++i)
if (m_bagslot[i] != 0)
if (m_bagslot[i]->GetObjectGuid() == guid)
return i;
return NULL_SLOT;
}
示例3: GetItemCount
uint32 Bag::GetItemCount(uint32 item, Item* eItem) const {
Item *pItem;
uint32 count = 0;
for (uint32 i = 0; i < GetBagSize(); ++i) {
pItem = m_bagslot[i];
if (pItem && pItem != eItem && pItem->GetEntry() == item)
count += pItem->GetCount();
}
if (eItem && eItem->GetProto()->GemProperties) {
for (uint32 i = 0; i < GetBagSize(); ++i) {
pItem = m_bagslot[i];
if (pItem && pItem != eItem && pItem->GetProto()->Socket[0].Color)
count += pItem->GetGemCountWithID(item);
}
}
return count;
}
示例4: GetItemCountWithLimitCategory
uint32 Bag::GetItemCountWithLimitCategory(uint32 limitCategory) const
{
uint32 count = 0;
for(uint32 i = 0; i < GetBagSize(); ++i)
if (m_bagslot[i])
if (m_bagslot[i]->GetProto()->ItemLimitCategory == limitCategory )
count += m_bagslot[i]->GetCount();
return count;
}
示例5: GetItemCount
uint32 Bag::GetItemCount(uint32 item, Item* eItem) const
{
uint32 count = 0;
for (uint32 i = 0; i < GetBagSize(); ++i)
if (m_bagslot[i])
if (m_bagslot[i] != eItem && m_bagslot[i]->GetEntry() == item)
count += m_bagslot[i]->GetCount();
return count;
}
示例6: GetItemCount
uint32 Bag::GetItemCount( uint32 item, Item* eItem ) const
{
Item *pItem;
uint32 count = 0;
for(uint32 i=0; i < GetBagSize(); ++i)
{
pItem = m_bagslot[i];
if( pItem && pItem != eItem && pItem->GetEntry() == item )
count += pItem->GetCount();
}
return count;
}
示例7: GetItemByPos
Item* Bag::GetItemByPos(uint8 slot) const {
if (slot < GetBagSize())
return m_bagslot[slot];
return NULL;
}