Dayz Explorer
1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
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
{
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
}
32
33
override
void
OnExecuteServer(
ActionData
action_data )
34
{
35
BearTrap trap;
36
Class
.CastTo(trap, action_data.m_Target.GetObject());
37
38
trap.Disarm();
39
}
40
}
ItemBase
Definition:
inventoryitem.c:730
UAMaxDistances
Definition:
actionconstants.c:104
ActionClapBearTrapWithThisItem
Definition:
actionclapbeartrapwiththisitem.c:1
m_FullBody
protected bool m_FullBody
Definition:
actionbase.c:52
PlayerBase
Definition:
playerbaseclient.c:1
ActionTarget
class ActionTargets ActionTarget
ActionData
Definition:
actionbase.c:20
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition:
dayzplayer.c:601
CCTCursor
Definition:
cctcursor.c:1
IsInReach
protected bool IsInReach(PlayerBase player, ActionTarget target, float maxDistance=1.0)
Definition:
actionbase.c:928
m_Text
protected string m_Text
Definition:
actionbase.c:49
ActionSingleUseBase
Definition:
actionsingleusebase.c:41
m_ConditionItem
ref CCIBase m_ConditionItem
Definition:
actionbase.c:55
CCINonRuined
Definition:
ccinonruined.c:1
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition:
actionbase.c:56
Class
Super root of all classes in Enforce script.
Definition:
enscript.c:10
m_StanceMask
protected int m_StanceMask
Definition:
actionbase.c:53
DAYZ
scripts_v1.24.157551
scripts
world
classes
useractionscomponent
actions
singleuse
actionclapbeartrapwiththisitem.c
Generated by
1.8.17