DayZ 1.24
Loading...
Searching...
No Matches
BurningMdfr Class Reference
Inheritance diagram for BurningMdfr:
[legend]
Collaboration diagram for BurningMdfr:
[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 BURNING_TRESHOLD = 199
 
const float HEALTH_DECREMENT_PER_SEC = -5
 

Detailed Description

Definition at line 1 of file Burning.c.

Member Function Documentation

◆ ActivateCondition()

override bool BurningMdfr::ActivateCondition ( PlayerBase player)
inlineprivate

Definition at line 13 of file Burning.c.

14 {
15 float hc = player.GetStatHeatComfort().Get();
16 if (hc > BURNING_TRESHOLD)
17 return true;
18 else
19 return false;
20 }
const float BURNING_TRESHOLD
Definition Burning.c:3

References BURNING_TRESHOLD.

◆ DeactivateCondition()

override bool BurningMdfr::DeactivateCondition ( PlayerBase player)
inlineprivate

Definition at line 28 of file Burning.c.

29 {
30 if (player.GetStatHeatComfort().Get() <= BURNING_TRESHOLD)
31 return true;
32 else
33 return false;
34 }

References BURNING_TRESHOLD.

◆ Init()

override void BurningMdfr::Init ( )
inlineprivate

Definition at line 6 of file Burning.c.

7 {
9 m_ID = eModifiers.MDF_BURNING;
12 }
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 BurningMdfr::OnActivate ( PlayerBase player)
inlineprivate

Definition at line 22 of file Burning.c.

23 {
24 //Print("My face is melting!");
25 }

◆ OnTick()

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

Definition at line 36 of file Burning.c.

37 {
38 float currenthealth = player.GetHealth("GlobalHealth", "Health");
39 player.SetHealth("GlobalHealth", "Health", (currenthealth + (HEALTH_DECREMENT_PER_SEC * deltaT)));
40 //player.GetStatTemperature().Set( player.GetStatTemperature().GetMax() );
41 }
const float HEALTH_DECREMENT_PER_SEC
Definition Burning.c:4

References HEALTH_DECREMENT_PER_SEC.

Member Data Documentation

◆ BURNING_TRESHOLD

const float BurningMdfr::BURNING_TRESHOLD = 199
private

Definition at line 3 of file Burning.c.

Referenced by ActivateCondition(), and DeactivateCondition().

◆ HEALTH_DECREMENT_PER_SEC

const float BurningMdfr::HEALTH_DECREMENT_PER_SEC = -5
private

Definition at line 4 of file Burning.c.

Referenced by OnTick().


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