DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ GetNumberOfItems()

int InventoryItem::GetNumberOfItems ( )
inlineprotected

Returns the number of items in cargo, otherwise returns 0(non-cargo objects). Recursive.

См. определение в файле ItemBase.c строка 3450

3451 {
3452 int item_count = 0;
3453 ItemBase item;
3454
3455 if (GetInventory().GetCargo() != NULL)
3456 {
3457 item_count = GetInventory().GetCargo().GetItemCount();
3458 }
3459
3460 for (int i = 0; i < GetInventory().AttachmentCount(); i++)
3461 {
3462 Class.CastTo(item,GetInventory().GetAttachmentFromIndex(i));
3463 if (item)
3464 item_count += item.GetNumberOfItems();
3465 }
3466 return item_count;
3467 }
void ItemBase()
Определения ItemBase.c:140

Перекрестные ссылки Class::CastTo() и ItemBase().