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

◆ GetAttachmentByType()

EntityAI Entity::GetAttachmentByType ( typename type )
inlineprotected

Get attached entity by type.

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

2102 {
2103 GameInventory inventory = GetInventory();
2104 int nAttachment = inventory.AttachmentCount();
2105 for ( int i = 0; i < nAttachment; ++i )
2106 {
2107 EntityAI attachment = inventory.GetAttachmentFromIndex( i );
2108 if ( attachment && attachment.IsInherited( type ) )
2109 return attachment;
2110 }
2111 return NULL;
2112 }
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().