DayZ
1.24
Loading...
Searching...
No Matches
CAContinuousQuantityBloodTransfer.c
Go to the documentation of this file.
1
class
CAContinuousQuantityBloodTransfer
:
CAContinuousQuantityRepeat
2
{
3
override
void
CalcAndSetQuantity
(
ActionData
action_data
)
4
{
5
if
(
GetGame
().IsServer())
6
{
7
if
(
m_SpentUnits
)
8
{
9
m_SpentUnits
.param1 =
m_SpentQuantity
;
10
SetACData
(
m_SpentUnits
);
11
}
12
13
action_data
.m_MainItem.AddQuantity(-
m_SpentQuantity
,
false
,
false
);
14
15
ActionGiveBloodData
action_data_b
=
ActionGiveBloodData
.Cast(
action_data
);
16
17
PlayerBase
bloodtarget
=
PlayerBase
.Cast(
action_data
.m_Target.GetObject());
18
if
(!
bloodtarget
)
19
bloodtarget
=
action_data
.m_Player;
20
21
22
if
(
BloodTypes
.
MatchBloodCompatibility
(
action_data_b
.m_ItemBloodType,
bloodtarget
.GetStatBloodType().Get()))
23
bloodtarget
.AddHealth(
""
,
"Blood"
,
m_SpentQuantity
);
24
25
}
26
}
27
}
ActionData
Definition
ActionBase.c:21
ActionGiveBloodData
Definition
ActionGiveBloodSelf.c:2
BloodTypes
Definition
BloodType.c:2
BloodTypes::MatchBloodCompatibility
static bool MatchBloodCompatibility(int bloodtypetarget, int bloodtype)
Definition
BloodType.c:36
CABase::SetACData
void SetACData(Param units)
Definition
CABase.c:38
CAContinuousQuantityBloodTransfer
Definition
CAContinuousQuantityBloodTransfer.c:2
CAContinuousQuantityBloodTransfer::CalcAndSetQuantity
override void CalcAndSetQuantity(ActionData action_data)
Definition
CAContinuousQuantityBloodTransfer.c:3
CAContinuousQuantityRepeat
Definition
CAContinuousQuantityRepeat.c:2
CAContinuousQuantityRepeat::m_SpentQuantity
float m_SpentQuantity
Definition
CAContinuousQuantityRepeat.c:4
CAContinuousQuantityRepeat::m_SpentUnits
ref Param1< float > m_SpentUnits
Definition
CAContinuousQuantityRepeat.c:10
Param3
Definition
EntityAI.c:95
PlayerBase
Definition
PlayerBaseClient.c:2
GetGame
proto native CGame GetGame()
scripts
4_World
Classes
UserActionsComponent
ActionComponents
CAContinuousQuantityBloodTransfer.c
Generated by
1.10.0