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

◆ GetAttachmentByType()

EntityAI Entity::GetAttachmentByType ( typename type )
inlineprotected

Get attached entity by type.

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

2087 {
2088 GameInventory inventory = GetInventory();
2089 int nAttachment = inventory.AttachmentCount();
2090 for ( int i = 0; i < nAttachment; ++i )
2091 {
2092 EntityAI attachment = inventory.GetAttachmentFromIndex( i );
2093 if ( attachment && attachment.IsInherited( type ) )
2094 return attachment;
2095 }
2096 return NULL;
2097 }
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().