DayZ
1.24
Loading...
Searching...
No Matches
ActionClapBearTrapWithThisItem.c
Go to the documentation of this file.
1
class
ActionClapBearTrapWithThisItem
:
ActionSingleUseBase
2
{
3
void
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
}
10
11
override
void
CreateConditionComponents
()
12
{
13
m_ConditionItem
=
new
CCINonRuined
;
14
m_ConditionTarget
=
new
CCTCursor
;
15
}
16
17
override
bool
ActionCondition
(
PlayerBase
player
, ActionTarget
target
,
ItemBase
item
)
18
{
19
if
(!
target
)
20
return
false
;
21
22
BearTrap
trap
;
23
if
(
Class
.
CastTo
(
trap
,
target
.GetObject()))
24
return
trap
.IsActive() &&
trap
.CanBeDisarmed() &&
IsInReach
(
player
,
target
,
UAMaxDistances
.
DEFAULT
);
25
26
return
false
;
27
}
28
29
override
void
OnExecuteServer
(
ActionData
action_data
)
30
{
31
BearTrap
trap
;
32
Class
.
CastTo
(
trap
,
action_data
.m_Target.GetObject());
33
34
trap
.Disarm();
35
}
36
}
m_FullBody
bool m_FullBody
Definition
ActionBase.c:52
m_Text
string m_Text
Definition
ActionBase.c:49
IsInReach
bool IsInReach(PlayerBase player, ActionTarget target, float maxDistance=1.0)
Definition
ActionBase.c:856
m_ConditionItem
ref CCIBase m_ConditionItem
Definition
ActionBase.c:55
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition
ActionBase.c:56
m_StanceMask
int m_StanceMask
Definition
ActionBase.c:53
ActionClapBearTrapWithThisItem
Definition
ActionClapBearTrapWithThisItem.c:2
ActionClapBearTrapWithThisItem::OnExecuteServer
override void OnExecuteServer(ActionData action_data)
Definition
ActionClapBearTrapWithThisItem.c:29
ActionClapBearTrapWithThisItem::CreateConditionComponents
override void CreateConditionComponents()
Definition
ActionClapBearTrapWithThisItem.c:11
ActionClapBearTrapWithThisItem::ActionClapBearTrapWithThisItem
void ActionClapBearTrapWithThisItem()
Definition
ActionClapBearTrapWithThisItem.c:3
ActionClapBearTrapWithThisItem::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
ActionClapBearTrapWithThisItem.c:17
ActionData
Definition
ActionBase.c:21
ActionSingleUseBase
Definition
ActionSingleUseBase.c:40
AnimatedActionBase::m_CommandUID
int m_CommandUID
Definition
AnimatedActionBase.c:122
CCINonRuined
Definition
CCINonRuined.c:2
CCTCursor
Definition
CCTCursor.c:2
Class
Super root of all classes in Enforce script.
Definition
EnScript.c:11
ItemBase
Definition
InventoryItem.c:697
Param3
Definition
EntityAI.c:95
PlayerBase
Definition
PlayerBaseClient.c:2
UAMaxDistances
Definition
ActionConstants.c:105
UAMaxDistances::DEFAULT
const float DEFAULT
Definition
ActionConstants.c:107
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition
dayzplayer.c:597
Class::CastTo
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
scripts
4_World
Classes
UserActionsComponent
Actions
SingleUse
ActionClapBearTrapWithThisItem.c
Generated by
1.10.0