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

Private Member Functions

override void Init ()
 
override bool ActivateCondition (PlayerBase player)
 
override void OnActivate (PlayerBase player)
 
override bool DeactivateCondition (PlayerBase player)
 
override void OnTick (PlayerBase player, float deltaT)
 

Private Attributes

const float MINIMAL_WATER_TO_REGENRATE = 2500
 
const float MINIMAL_ENERGY_TO_REGENRATE = 4000
 
const float MINIMAL_BLOOD_TO_REGENRATE = 5000
 
const float MINIMAL_BLOOD_REQUIRED_TO_REGENERATE_HEALTH = 5000
 
const float BONE_HEALTH_INCREMENT_PER_SEC = 0.25
 

Detailed Description

Definition at line 1 of file BoneRegen.c.

Member Function Documentation

◆ ActivateCondition()

override bool BoneRegenMdfr::ActivateCondition ( PlayerBase player)
inlineprivate

Definition at line 17 of file BoneRegen.c.

18 {
19 if (player.GetHealth("GlobalHealth", "Blood") >= MINIMAL_BLOOD_TO_REGENRATE && player.GetStatWater().Get() >= MINIMAL_WATER_TO_REGENRATE && player.GetStatEnergy().Get() >= MINIMAL_ENERGY_TO_REGENRATE)
20 return true;
21 else
22 return false;
23 }
const float MINIMAL_BLOOD_TO_REGENRATE
Definition BoneRegen.c:5
const float MINIMAL_WATER_TO_REGENRATE
Definition BoneRegen.c:3
const float MINIMAL_ENERGY_TO_REGENRATE
Definition BoneRegen.c:4

References MINIMAL_BLOOD_TO_REGENRATE, MINIMAL_ENERGY_TO_REGENRATE, and MINIMAL_WATER_TO_REGENRATE.

◆ DeactivateCondition()

override bool BoneRegenMdfr::DeactivateCondition ( PlayerBase player)
inlineprivate

Definition at line 29 of file BoneRegen.c.

30 {
31 if (player.GetHealth("GlobalHealth", "Blood") < MINIMAL_BLOOD_TO_REGENRATE && player.GetStatWater().Get() < MINIMAL_WATER_TO_REGENRATE && player.GetStatEnergy().Get() < MINIMAL_ENERGY_TO_REGENRATE)
32 return true;
33 else
34 return false;
35 }

References MINIMAL_BLOOD_TO_REGENRATE, MINIMAL_ENERGY_TO_REGENRATE, and MINIMAL_WATER_TO_REGENRATE.

◆ Init()

override void BoneRegenMdfr::Init ( )
inlineprivate

Definition at line 9 of file BoneRegen.c.

10 {
12 m_ID = eModifiers.MDF_BONE_REGEN;
15 }
int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
Definition Effect.c:49
bool m_TrackActivatedTime
float m_TickIntervalActive
float m_TickIntervalInactive
const int DEFAULT_TICK_TIME_INACTIVE
const int DEFAULT_TICK_TIME_ACTIVE
eModifiers
Definition eModifiers.c:2

References DEFAULT_TICK_TIME_ACTIVE, DEFAULT_TICK_TIME_INACTIVE, m_ID, m_TickIntervalActive, m_TickIntervalInactive, and m_TrackActivatedTime.

◆ OnActivate()

override void BoneRegenMdfr::OnActivate ( PlayerBase player)
inlineprivate

Definition at line 25 of file BoneRegen.c.

26 {
27 }

◆ OnTick()

override void BoneRegenMdfr::OnTick ( PlayerBase player,
float deltaT )
inlineprivate

Definition at line 37 of file BoneRegen.c.

38 {
39 /*
40 player.AddHealth("RightArm","Health",BONE_HEALTH_INCREMENT_PER_SEC * deltaT);
41 player.AddHealth("RightHand","Health",BONE_HEALTH_INCREMENT_PER_SEC * deltaT);
42 player.AddHealth("LeftArm","Health",BONE_HEALTH_INCREMENT_PER_SEC * deltaT);
43 player.AddHealth("LeftHand","Health",+BONE_HEALTH_INCREMENT_PER_SEC * deltaT);
44
45 player.AddHealth("RightLeg","Health",+BONE_HEALTH_INCREMENT_PER_SEC * deltaT);
46 player.AddHealth("RightFoot","Health",+BONE_HEALTH_INCREMENT_PER_SEC * deltaT);
47 player.AddHealth("LeftLeg","Health",+BONE_HEALTH_INCREMENT_PER_SEC * deltaT);
48 player.AddHealth("LeftFoot","Health",+BONE_HEALTH_INCREMENT_PER_SEC * deltaT);
49
50 player.AddHealth("Torso","Health",+BONE_HEALTH_INCREMENT_PER_SEC * deltaT);
51 */
52 }

Member Data Documentation

◆ BONE_HEALTH_INCREMENT_PER_SEC

const float BoneRegenMdfr::BONE_HEALTH_INCREMENT_PER_SEC = 0.25
private

Definition at line 7 of file BoneRegen.c.

◆ MINIMAL_BLOOD_REQUIRED_TO_REGENERATE_HEALTH

const float BoneRegenMdfr::MINIMAL_BLOOD_REQUIRED_TO_REGENERATE_HEALTH = 5000
private

Definition at line 6 of file BoneRegen.c.

◆ MINIMAL_BLOOD_TO_REGENRATE

const float BoneRegenMdfr::MINIMAL_BLOOD_TO_REGENRATE = 5000
private

Definition at line 5 of file BoneRegen.c.

Referenced by ActivateCondition(), and DeactivateCondition().

◆ MINIMAL_ENERGY_TO_REGENRATE

const float BoneRegenMdfr::MINIMAL_ENERGY_TO_REGENRATE = 4000
private

Definition at line 4 of file BoneRegen.c.

Referenced by ActivateCondition(), and DeactivateCondition().

◆ MINIMAL_WATER_TO_REGENRATE

const float BoneRegenMdfr::MINIMAL_WATER_TO_REGENRATE = 2500
private

Definition at line 3 of file BoneRegen.c.

Referenced by ActivateCondition(), and DeactivateCondition().


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