Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
actionbandageself.c
Go to the documentation of this file.
1
class
ActionBandageSelfCB
:
ActionContinuousBaseCB
2
{
3
override
void
CreateActionComponent
()
4
{
5
float
effectivity =
m_ActionData
.m_MainItem.GetBandagingEffectivity();
6
float
adjustedTimeSpent = 0;
7
8
if
(effectivity > 0)
9
adjustedTimeSpent =
UATimeSpent
.
BANDAGE
/ effectivity;
10
11
m_ActionData
.m_ActionComponent =
new
CAContinuousRepeat
(adjustedTimeSpent);
12
}
13
}
14
15
class
ActionBandageSelf
:
ActionBandageBase
16
{
17
void
ActionBandageSelf
()
18
{
19
m_CallbackClass =
ActionBandageSelfCB
;
20
m_CommandUID
=
DayZPlayerConstants
.CMD_ACTIONFB_BANDAGE;
21
m_FullBody =
true
;
22
m_StanceMask
=
DayZPlayerConstants
.STANCEMASK_CROUCH;
23
24
m_Text =
"#treat_wound"
;
25
}
26
27
override
void
CreateConditionComponents
()
28
{
29
m_ConditionItem =
new
CCINonRuined
();
30
m_ConditionTarget =
new
CCTSelf
();
31
}
32
33
override
bool
HasTarget
()
34
{
35
return
false
;
36
}
37
38
override
bool
ActionCondition
(
PlayerBase
player,
ActionTarget
target,
ItemBase
item)
39
{
40
return
player.IsBleeding();
41
}
42
43
override
void
OnFinishProgressServer
(
ActionData
action_data)
44
{
45
PlayerBase
target =
PlayerBase
.Cast(action_data.m_Player);
46
if
(action_data.m_MainItem && target)
47
ApplyBandage
(action_data.m_MainItem, target);
48
}
49
}
ActionBandageSelf
ActionBandageSelfCB ActionContinuousBaseCB ActionBandageSelf()
Definition
actionbandageself.c:17
m_CommandUID
int m_CommandUID
Definition
actionbase.c:31
m_StanceMask
int m_StanceMask
Definition
actionbase.c:33
ActionData
ActionBase ActionData
Definition
actionbase.c:30
ActionTarget
class ActionTargets ActionTarget
ActionBandageBase
Definition
actionbandagebase.c:2
ActionBandageBase::ApplyBandage
void ApplyBandage(ItemBase item, PlayerBase player)
Definition
actionbandagebase.c:3
ActionBandageSelfCB
Definition
actionbandageself.c:2
ActionBandageSelfCB::CreateActionComponent
override void CreateActionComponent()
Definition
actionbandageself.c:3
ActionBaseCB::m_ActionData
ActionData m_ActionData
Definition
animatedactionbase.c:3
ActionBase::CreateConditionComponents
void CreateConditionComponents()
Definition
actionbase.c:236
ActionBase::HasTarget
bool HasTarget()
Action is performed on target, not with item itself, when set to true.
Definition
actionbase.c:250
ActionContinuousBaseCB
Definition
actioncontinuousbase.c:2
ActionContinuousBase::OnFinishProgressServer
void OnFinishProgressServer(ActionData action_data)
Definition
actioncontinuousbase.c:283
AnimatedActionBase::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
animatedactionbase.c:240
CAContinuousRepeat
Definition
cacontinuousrepeat.c:2
CCINonRuined
Definition
ccinonruined.c:2
CCTSelf
Definition
cctself.c:2
ItemBase
Definition
inventoryitem.c:742
PlayerBase
Definition
playerbaseclient.c:2
UATimeSpent
Definition
actionconstants.c:28
UATimeSpent::BANDAGE
const float BANDAGE
Definition
actionconstants.c:43
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition
dayzplayer.c:602
Games
Dayz
scripts
4_world
classes
useractionscomponent
actions
continuous
medical
actionbandageself.c
Generated by
1.17.0