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

◆ GetAttachmentByConfigTypeName()

EntityAI Entity::GetAttachmentByConfigTypeName ( string type)
inlineprotected

Get attached entity by config type name.

См. определение в файле 3_Game/DayZ/Entities/EntityAI.c строка 2117

2118 {
2119 GameInventory inventory = GetInventory();
2120 int nAttachment = inventory.AttachmentCount();
2121 for ( int i = 0; i < nAttachment; ++i )
2122 {
2123 EntityAI attachment = inventory.GetAttachmentFromIndex ( i );
2124 if ( attachment.IsKindOf ( type ) )
2125 return attachment;
2126 }
2127 return NULL;
2128 }
proto native GameInventory GetInventory()
void EntityAI()
cache blood infection chance (cfgVehicles-><entity>->Skinning->BloodInfectionSettings)
proto native EntityAI GetAttachmentFromIndex(int index)
proto native int AttachmentCount()
Returns count of attachments attached to this item.

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