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

◆ ActionCondition()

override bool ActionTurnOnWeaponFlashlight::ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate

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

23 {
24 if ( item.IsInherited(Rifle_Base) )
25 {
26 //m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_LIGHTFLARE;
27 m_flashlight = ItemBase.Cast(item.FindAttachmentBySlotName("weaponFlashlight"));
28 }
29 else if (item.IsInherited(Pistol_Base))
30 {
31 //m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_LITCHEMLIGHT;
32 m_flashlight = ItemBase.Cast(item.FindAttachmentBySlotName("pistolFlashlight"));
33 }
34 else //is not valid item
35 return false;
36
37 if ( m_flashlight && m_flashlight.HasEnergyManager() && m_flashlight.GetCompEM().CanSwitchOn() && m_flashlight.GetCompEM().CanWork() ) //TODO review conditions for turning off
38 {
39 return true;
40 }
41
42 return false;
43 }
class GP5GasMask extends MaskBase ItemBase

Перекрестные ссылки ActionTarget и m_flashlight.