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

◆ FindCargoByBaseType()

EntityAI ManBase::FindCargoByBaseType ( string searched_item)
inlineprotected

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

2354 {
2355 EntityAI attachment;
2356 string item_name;
2357 GameInventory inventory = GetInventory();
2358 int attcount = inventory.AttachmentCount();
2359
2360 for (int att = 0; att < attcount; ++att)
2361 {
2362 attachment = inventory.GetAttachmentFromIndex(att);
2363 if (attachment.IsItemBase())
2364 {
2365 item_name = attachment.GetType();
2366 if (g_Game.IsKindOf(item_name, searched_item))
2367 {
2368 return attachment;
2369 }
2370 }
2371 }
2372 return NULL;
2373 }
class LogManager EntityAI
DayZGame g_Game
Определения DayZGame.c:3942
proto native EntityAI GetAttachmentFromIndex(int index)
proto native int AttachmentCount()
Returns count of attachments attached to this item.

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