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

◆ GetProtectionLevelCachedEquipment()

static float PluginBase::GetProtectionLevelCachedEquipment ( int type,
int cachedEquipmentStorageMask,
Man player )
inlinestaticprotected

Protection level of an attachment against enviromental hazard (mask/filters for example) based on result from CachedEquipmentStorage.

Аргументы
typeType of protection (see DEF_BIOLOGICAL in constants.c for example)
slotInventory slot id
playerPlayer reference
consider_filter(unused parameter for now)
system(unused parameter for now)
Возвращает
Attachment protechtion level

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

578 {
579 CachedEquipmentStorageQuery query = new CachedEquipmentStorageQuery();
580 query.m_Category = cachedEquipmentStorageMask;
581 query.m_Placement = ECachedEquipmentPlacement.ATTACHMENT;
582 query.m_MaximumDepth = 2;
583
584 float protectionLevel = 0.0;
585 array<Entity> attachments = player.GetCachedEquipment().GetEntitiesByCategory(query);
586 foreach (Entity attachmentEntity : attachments)
587 {
588 ItemBase attachment = ItemBase.Cast(attachmentEntity);
589 protectionLevel += attachment.GetProtectionLevel(type);
590 }
591
592 return protectionLevel;
593
594 }
ECachedEquipmentPlacement
Определения ECachedEquipmentPlacement.c:2
class GP5GasMask extends MaskBase ItemBase
ECachedEquipmentItemCategory m_Category
Определения CachedEquipmentStorageBase.c:5
ECachedEquipmentPlacement m_Placement
Определения CachedEquipmentStorageBase.c:6

Перекрестные ссылки CachedEquipmentStorageQuery::m_Category, CachedEquipmentStorageQuery::m_MaximumDepth и CachedEquipmentStorageQuery::m_Placement.

Используется в TransmitAgentsEx().