DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс ActionClapBearTrapWithThisItem
+ Граф наследования:ActionClapBearTrapWithThisItem:

Закрытые члены

void ActionClapBearTrapWithThisItem ()
 
override void CreateConditionComponents ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnExecuteServer (ActionData action_data)
 

Подробное описание

Конструктор(ы)

◆ ActionClapBearTrapWithThisItem()

4 {
5 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_POKE;
6 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH;
7 m_FullBody = true;
8 m_Text = "#trigger_bear_trap";
9 }
bool m_FullBody
Definition ActionBase.c:61
string m_Text
Definition ActionBase.c:58
int m_StanceMask
Definition ActionBase.c:62
int m_CommandUID
Definition AnimatedActionBase.c:143
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

Перекрестные ссылки AnimatedActionBase::m_CommandUID, ActionBase::m_FullBody, ActionBase::m_StanceMask и ActionBase::m_Text.

Методы

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate
18 {
19 if (!target)
20 {
21 return false;
22 }
23
24 BearTrap trap;
25 if (Class.CastTo(trap, target.GetObject()))
26 {
27 return trap.IsActive() && trap.CanBeDisarmed() && IsInReach(player, target, UAMaxDistances.DEFAULT);
28 }
29
30 return false;
31 }
bool IsInReach(PlayerBase player, ActionTarget target, float maxDistance=1.0)
Definition ActionBase.c:1054
Super root of all classes in Enforce script.
Definition EnScript.c:11
Definition EntityAI.c:95
Definition ActionConstants.c:106
const float DEFAULT
Definition ActionConstants.c:108
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

Перекрестные ссылки Class::CastTo(), UAMaxDistances::DEFAULT и ActionBase::IsInReach().

◆ CreateConditionComponents()

override void CreateConditionComponents ( )
inlineprivate
12 {
15 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:64
ref CCTBase m_ConditionTarget
Definition ActionBase.c:65
Definition CCINonRuined.c:2
Definition CCTCursor.c:2

Перекрестные ссылки ActionBase::m_ConditionItem и ActionBase::m_ConditionTarget.

◆ OnExecuteServer()

override void OnExecuteServer ( ActionData action_data)
inlineprivate
34 {
35 BearTrap trap;
36 Class.CastTo(trap, action_data.m_Target.GetObject());
37
38 trap.Disarm();
39 }

Перекрестные ссылки Class::CastTo().


Объявления и описания членов класса находятся в файле: