DayZ
1.24
Loading...
Searching...
No Matches
ActionCollectSampleSelf.c
Go to the documentation of this file.
1
class
ActionCollectSampleSelfCB
:
ActionContinuousBaseCB
2
{
3
override
void
CreateActionComponent
()
4
{
5
m_ActionData
.
m_ActionComponent
=
new
CAContinuousTime
(
UATimeSpent
.
COLLECT_SAMPLE
);
6
}
7
};
8
9
class
ActionCollectSampleSelf
:
ActionContinuousBase
10
{
11
void
ActionCollectSampleSelf
()
12
{
13
m_CallbackClass
=
ActionCollectSampleSelfCB
;
14
m_CommandUID
=
DayZPlayerConstants
.CMD_ACTIONFB_COLLECTBLOODSELF;
15
m_FullBody
=
true
;
16
m_StanceMask
=
DayZPlayerConstants
.STANCEMASK_ERECT |
DayZPlayerConstants
.STANCEMASK_CROUCH;
17
m_SpecialtyWeight
=
UASoftSkillsWeight
.
PRECISE_MEDIUM
;
18
m_Text
=
"#collect_sample"
;
19
}
20
21
override
void
CreateConditionComponents
()
22
{
23
m_ConditionItem
=
new
CCINonRuined
;
24
m_ConditionTarget
=
new
CCTSelf
;
25
}
26
27
override
bool
HasTarget
()
28
{
29
return
false
;
30
}
31
32
override
void
OnEndServer
(
ActionData
action_data
)
33
{
34
Param1<float>
nacdata
;
35
Class
.
CastTo
(
nacdata
,
action_data
.m_ActionComponent.GetACData());
36
float
delta
= 0;
37
if
(
nacdata
)
38
delta
= (
nacdata
.param1 /
UATimeSpent
.
COLLECT_SAMPLE
);
39
40
if
(
delta
> 0)
41
{
42
ActionCollectBloodTargetLambda
lambda
=
new
ActionCollectBloodTargetLambda
(
action_data
.m_MainItem,
"BloodSyringe"
,
action_data
.m_Player,
m_SpecialtyWeight
,
action_data
.m_Player,
delta
);
43
action_data
.m_Player.ServerReplaceItemInHandsWithNew(
lambda
);
44
}
45
}
46
};
47
m_FullBody
bool m_FullBody
Definition
ActionBase.c:52
m_Text
string m_Text
Definition
ActionBase.c:49
m_ConditionItem
ref CCIBase m_ConditionItem
Definition
ActionBase.c:55
m_SpecialtyWeight
float m_SpecialtyWeight
Definition
ActionBase.c:68
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition
ActionBase.c:56
m_StanceMask
int m_StanceMask
Definition
ActionBase.c:53
ActionBaseCB::m_ActionData
ActionData m_ActionData
Definition
AnimatedActionBase.c:3
ActionCollectBloodTargetLambda
Definition
ActionCollectBloodTarget.c:50
ActionCollectSampleSelfCB
Definition
ActionCollectSampleSelf.c:2
ActionCollectSampleSelfCB::CreateActionComponent
override void CreateActionComponent()
Definition
ActionCollectSampleSelf.c:3
ActionCollectSampleSelf
Definition
ActionCollectSampleSelf.c:10
ActionCollectSampleSelf::ActionCollectSampleSelf
void ActionCollectSampleSelf()
Definition
ActionCollectSampleSelf.c:11
ActionCollectSampleSelf::HasTarget
override bool HasTarget()
Definition
ActionCollectSampleSelf.c:27
ActionCollectSampleSelf::CreateConditionComponents
override void CreateConditionComponents()
Definition
ActionCollectSampleSelf.c:21
ActionCollectSampleSelf::OnEndServer
override void OnEndServer(ActionData action_data)
Definition
ActionCollectSampleSelf.c:32
ActionContinuousBaseCB
Definition
ActionContinuousBase.c:2
ActionContinuousBase
Definition
ActionContinuousBase.c:119
ActionData
Definition
ActionBase.c:21
ActionData::m_ActionComponent
ref CABase m_ActionComponent
Definition
ActionBase.c:30
AnimatedActionBase::m_CommandUID
int m_CommandUID
Definition
AnimatedActionBase.c:122
AnimatedActionBase::m_CallbackClass
m_CallbackClass
Definition
AnimatedActionBase.c:124
CAContinuousTime
Definition
CAContinuousTime.c:2
CCINonRuined
Definition
CCINonRuined.c:2
CCTSelf
Definition
CCTSelf.c:2
Class
Super root of all classes in Enforce script.
Definition
EnScript.c:11
Param3
Definition
EntityAI.c:95
UASoftSkillsWeight
Definition
ActionConstants.c:119
UASoftSkillsWeight::PRECISE_MEDIUM
const float PRECISE_MEDIUM
Definition
ActionConstants.c:124
UATimeSpent
Definition
ActionConstants.c:27
UATimeSpent::COLLECT_SAMPLE
const float COLLECT_SAMPLE
Definition
ActionConstants.c:47
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
Continuous
Medical
ActionCollectSampleSelf.c
Generated by
1.10.0