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

◆ GetAttachmentByConfigTypeName()

EntityAI Entity::GetAttachmentByConfigTypeName ( string type)
inlineprotected

Get attached entity by config type name.

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

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