DayZ 1.24
Loading...
Searching...
No Matches
CAContinuousQuantityBloodTransfer Class Reference
Inheritance diagram for CAContinuousQuantityBloodTransfer:
[legend]
Collaboration diagram for CAContinuousQuantityBloodTransfer:
[legend]

Private Member Functions

override void CalcAndSetQuantity (ActionData action_data)
 
- Private Member Functions inherited from CAContinuousQuantityRepeat
void CAContinuousQuantityRepeat (float quantity_used_per_second, float time_to_repeat)
 
override void Setup (ActionData action_data)
 
override int Execute (ActionData action_data)
 
override int Cancel (ActionData action_data)
 
override float GetProgress ()
 
void CalcAndSetQuantity (ActionData action_data)
 

Additional Inherited Members

- Private Attributes inherited from CAContinuousQuantityRepeat
float m_ItemQuantity
 
float m_SpentQuantity
 
float m_ItemMaxQuantity
 
float m_TimeElpased
 
float m_QuantityUsedPerSecond
 
float m_AdjustedQuantityUsedPerSecond
 
float m_DefaultTimeToRepeat
 
ref Param1< floatm_SpentUnits
 

Detailed Description

Definition at line 1 of file CAContinuousQuantityBloodTransfer.c.

Member Function Documentation

◆ CalcAndSetQuantity()

override void CAContinuousQuantityBloodTransfer::CalcAndSetQuantity ( ActionData action_data)
inlineprivate

Definition at line 3 of file CAContinuousQuantityBloodTransfer.c.

4 {
5 if (GetGame().IsServer())
6 {
7 if (m_SpentUnits)
8 {
11 }
12
13 action_data.m_MainItem.AddQuantity(-m_SpentQuantity, false, false);
14
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 }
static bool MatchBloodCompatibility(int bloodtypetarget, int bloodtype)
Definition BloodType.c:36
void SetACData(Param units)
Definition CABase.c:38
proto native CGame GetGame()

References GetGame(), CAContinuousQuantityRepeat::m_SpentQuantity, CAContinuousQuantityRepeat::m_SpentUnits, BloodTypes::MatchBloodCompatibility(), and CABase::SetACData().


The documentation for this class was generated from the following file: