DayZ
1.24
Loading...
Searching...
No Matches
ActionCollectBloodSelf.c
Go to the documentation of this file.
1
class
ActionCollectBloodSelfCB
:
ActionContinuousBaseCB
2
{
3
override
void
CreateActionComponent
()
4
{
5
m_ActionData
.
m_ActionComponent
=
new
CAContinuousTime
(
UATimeSpent
.
COLLECT_BLOOD
);
6
}
7
};
8
9
class
ActionCollectBloodSelf
:
ActionContinuousBase
10
{
11
void
ActionCollectBloodSelf
()
12
{
13
m_CallbackClass
=
ActionCollectBloodSelfCB
;
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_HIGH
;
18
m_Text
=
"#collect_blood"
;
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_BLOOD
);
39
40
if
(
delta
> 0)
41
{
42
ActionCollectBloodTargetLambda
lambda
=
new
ActionCollectBloodTargetLambda
(
action_data
.m_MainItem,
"BloodBagFull"
,
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
ActionCollectBloodSelfCB
Definition
ActionCollectBloodSelf.c:2
ActionCollectBloodSelfCB::CreateActionComponent
override void CreateActionComponent()
Definition
ActionCollectBloodSelf.c:3
ActionCollectBloodSelf
Definition
ActionCollectBloodSelf.c:10
ActionCollectBloodSelf::ActionCollectBloodSelf
void ActionCollectBloodSelf()
Definition
ActionCollectBloodSelf.c:11
ActionCollectBloodSelf::OnEndServer
override void OnEndServer(ActionData action_data)
Definition
ActionCollectBloodSelf.c:32
ActionCollectBloodSelf::HasTarget
override bool HasTarget()
Definition
ActionCollectBloodSelf.c:27
ActionCollectBloodSelf::CreateConditionComponents
override void CreateConditionComponents()
Definition
ActionCollectBloodSelf.c:21
ActionCollectBloodTargetLambda
Definition
ActionCollectBloodTarget.c:50
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_HIGH
const float PRECISE_HIGH
Definition
ActionConstants.c:125
UATimeSpent
Definition
ActionConstants.c:27
UATimeSpent::COLLECT_BLOOD
const float COLLECT_BLOOD
Definition
ActionConstants.c:46
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
ActionCollectBloodSelf.c
Generated by
1.10.0