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

◆ FindCargoByBaseType()

EntityAI ManBase::FindCargoByBaseType ( string searched_item)
inlineprotected

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

2535 {
2536 EntityAI attachment;
2537 string item_name;
2538 GameInventory inventory = GetInventory();
2539 int attcount = inventory.AttachmentCount();
2540
2541 for (int att = 0; att < attcount; ++att)
2542 {
2543 attachment = inventory.GetAttachmentFromIndex(att);
2544 if (attachment.IsItemBase())
2545 {
2546 item_name = attachment.GetType();
2547 if (g_Game.IsKindOf(item_name, searched_item))
2548 {
2549 return attachment;
2550 }
2551 }
2552 }
2553 return NULL;
2554 }
class LogManager EntityAI
DayZGame g_Game
Определения DayZGame.c:4074
proto native EntityAI GetAttachmentFromIndex(int index)
proto native int AttachmentCount()
Returns count of attachments attached to this item.

Перекрестные ссылки GameInventory::AttachmentCount(), g_Game и GameInventory::GetAttachmentFromIndex().