Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
actionsplinttarget.c
Go to the documentation of this file.
1
class
ActionSplintTargetCB
:
ActionContinuousBaseCB
2
{
3
override
void
CreateActionComponent
()
4
{
5
m_ActionData
.m_ActionComponent =
new
CAContinuousTime
(
UATimeSpent
.
APPLY_SPLINT
);
6
}
7
};
8
9
class
ActionSplintTarget
:
ActionContinuousBase
10
{
11
void
ActionSplintTarget
()
12
{
13
m_CallbackClass
=
ActionSplintTargetCB
;
14
m_CommandUID
=
DayZPlayerConstants
.CMD_ACTIONFB_BANDAGETARGET;
15
m_FullBody
=
true
;
16
m_SpecialtyWeight
= UASoftSkillsWeight.PRECISE_LOW;
17
m_Text
=
"#fix_persons_fracture"
;
18
}
19
20
override
void
CreateConditionComponents
()
21
{
22
m_ConditionItem
=
new
CCINonRuined
;
23
m_ConditionTarget
=
new
CCTMan
(
UAMaxDistances
.
DEFAULT
);
24
}
25
26
override
void
OnFinishProgressServer
(
ActionData
action_data )
27
{
28
PlayerBase
ntarget =
PlayerBase
.Cast( action_data.m_Target.GetObject() );
29
if
(
CanReceiveAction
(action_data.m_Target))
30
{
31
action_data.m_MainItem.TransferModifiers(ntarget);
32
ntarget.ApplySplint();
33
34
ItemBase
new_item =
ItemBase
.Cast(ntarget.GetInventory().CreateInInventory(
"Splint_Applied"
));
35
if
( new_item )
36
{
37
MiscGameplayFunctions.TransferItemProperties(action_data.m_MainItem,new_item,
true
,
false
,
true
);
38
action_data.m_MainItem.Delete();
39
}
40
41
ntarget.SetBrokenLegs(
eBrokenLegs
.BROKEN_LEGS_SPLINT);
42
}
43
}
44
45
override
bool
ActionCondition
(
PlayerBase
player,
ActionTarget
target,
ItemBase
item)
46
{
47
PlayerBase
ntarget =
PlayerBase
.Cast( target.GetObject() );
48
if
(ntarget.GetBrokenLegs() !=
eBrokenLegs
.BROKEN_LEGS ||
IsWearingSplint
(ntarget) || ntarget.IsInVehicle())
49
{
50
return
false
;
51
}
52
return
super.ActionCondition(player, target, item);
53
54
}
55
56
bool
IsWearingSplint
(
PlayerBase
player )
57
{
58
if
( player.GetItemOnSlot(
"Splint_Right"
) )
59
{
60
return
true
;
61
}
62
return
false
;
63
}
64
};
ActionData
ActionBase ActionData
Definition
actionbase.c:30
ActionTarget
class ActionTargets ActionTarget
ActionBaseCB::m_ActionData
ActionData m_ActionData
Definition
animatedactionbase.c:3
ActionBase::m_FullBody
bool m_FullBody
Definition
actionbase.c:67
ActionBase::m_Text
string m_Text
Definition
actionbase.c:64
ActionBase::m_ConditionItem
ref CCIBase m_ConditionItem
Definition
actionbase.c:70
ActionBase::m_SpecialtyWeight
float m_SpecialtyWeight
Definition
actionbase.c:83
ActionBase::m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition
actionbase.c:71
ActionBase::CanReceiveAction
bool CanReceiveAction(ActionTarget target)
Definition
actionbase.c:805
ActionContinuousBaseCB
Definition
actioncontinuousbase.c:2
ActionContinuousBase::ActionContinuousBase
void ActionContinuousBase()
Definition
actioncontinuousbase.c:124
ActionSplintTargetCB
Definition
actionsplinttarget.c:2
ActionSplintTargetCB::CreateActionComponent
override void CreateActionComponent()
Definition
actionsplinttarget.c:3
ActionSplintTarget::OnFinishProgressServer
override void OnFinishProgressServer(ActionData action_data)
Definition
actionsplinttarget.c:26
ActionSplintTarget::ActionSplintTarget
void ActionSplintTarget()
Definition
actionsplinttarget.c:11
ActionSplintTarget::CreateConditionComponents
override void CreateConditionComponents()
Definition
actionsplinttarget.c:20
ActionSplintTarget::IsWearingSplint
bool IsWearingSplint(PlayerBase player)
Definition
actionsplinttarget.c:56
ActionSplintTarget::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
actionsplinttarget.c:45
AnimatedActionBase::m_CommandUID
int m_CommandUID
Definition
animatedactionbase.c:143
AnimatedActionBase::m_CallbackClass
m_CallbackClass
Definition
animatedactionbase.c:145
CAContinuousTime
Definition
cacontinuoustime.c:2
CCINonRuined
Definition
ccinonruined.c:2
CCTMan
Definition
cctman.c:2
ItemBase
Definition
inventoryitem.c:742
PlayerBase
Definition
playerbaseclient.c:2
UAMaxDistances
Definition
actionconstants.c:110
UAMaxDistances::DEFAULT
const float DEFAULT
Definition
actionconstants.c:112
UATimeSpent
Definition
actionconstants.c:28
UATimeSpent::APPLY_SPLINT
const float APPLY_SPLINT
Definition
actionconstants.c:45
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition
dayzplayer.c:602
eBrokenLegs
eBrokenLegs
Definition
ebrokenlegs.c:2
Games
Dayz
scripts
4_world
classes
useractionscomponent
actions
continuous
medical
actionsplinttarget.c
Generated by
1.17.0