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

Protected Member Functions

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

Private Member Functions

override void Init ()
 
override string GetDebugText ()
 

Private Attributes

const int AGENT_THRESHOLD_ACTIVATE = 300
 
const int AGENT_THRESHOLD_DEACTIVATE = 200
 

Detailed Description

Definition at line 1 of file Influenza.c.

Member Function Documentation

◆ ActivateCondition()

bool InfluenzaMdfr::ActivateCondition ( PlayerBase player)
inlineprotected

Definition at line 19 of file Influenza.c.

20 {
21 if (player.GetSingleAgentCount(eAgents.INFLUENZA) >= AGENT_THRESHOLD_ACTIVATE)
22 return true;
23 return false;
24 }
eAgents
Definition EAgents.c:3
const int AGENT_THRESHOLD_ACTIVATE
Definition Influenza.c:3

References AGENT_THRESHOLD_ACTIVATE.

◆ DeactivateCondition()

bool InfluenzaMdfr::DeactivateCondition ( PlayerBase player)
inlineprotected

Definition at line 36 of file Influenza.c.

37 {
38 return (player.GetSingleAgentCount(eAgents.INFLUENZA) <= AGENT_THRESHOLD_DEACTIVATE);
39 }
const int AGENT_THRESHOLD_DEACTIVATE
Definition Influenza.c:4

References AGENT_THRESHOLD_DEACTIVATE.

◆ GetDebugText()

override string InfluenzaMdfr::GetDebugText ( )
inlineprivate

Definition at line 14 of file Influenza.c.

15 {
16 return ("Activate threshold: " + AGENT_THRESHOLD_ACTIVATE + "| " + "Deativate threshold: " + AGENT_THRESHOLD_DEACTIVATE);
17 }

References AGENT_THRESHOLD_ACTIVATE, and AGENT_THRESHOLD_DEACTIVATE.

◆ Init()

override void InfluenzaMdfr::Init ( )
inlineprivate

Definition at line 6 of file Influenza.c.

7 {
9 m_ID = eModifiers.MDF_INFLUENZA;
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()

void InfluenzaMdfr::OnActivate ( PlayerBase player)
inlineprotected

Definition at line 26 of file Influenza.c.

27 {
28 player.IncreaseDiseaseCount();
29 }

◆ OnDeactivate()

void InfluenzaMdfr::OnDeactivate ( PlayerBase player)
inlineprotected

Definition at line 31 of file Influenza.c.

32 {
33 player.DecreaseDiseaseCount();
34 }

◆ OnTick()

void InfluenzaMdfr::OnTick ( PlayerBase player,
float deltaT )
inlineprotected

Definition at line 41 of file Influenza.c.

42 {
43 float chance_of_cough = player.GetSingleAgentCountNormalized(eAgents.INFLUENZA);
44
46 player.GetSymptomManager().QueueUpPrimarySymptom(SymptomIDs.SYMPTOM_COUGH);
47 }
Definition EnMath.c:7
static float RandomFloat01()
Returns a random float number between and min [inclusive] and max [inclusive].
Definition EnMath.c:126
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].

References Math::RandomFloat01(), and Math::RandomInt().

Member Data Documentation

◆ AGENT_THRESHOLD_ACTIVATE

const int InfluenzaMdfr::AGENT_THRESHOLD_ACTIVATE = 300
private

Definition at line 3 of file Influenza.c.

Referenced by ActivateCondition(), and GetDebugText().

◆ AGENT_THRESHOLD_DEACTIVATE

const int InfluenzaMdfr::AGENT_THRESHOLD_DEACTIVATE = 200
private

Definition at line 4 of file Influenza.c.

Referenced by DeactivateCondition(), and GetDebugText().


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