DayZ 1.24
Loading...
Searching...
No Matches
ContaminationStage3Mdfr Class Reference
Inheritance diagram for ContaminationStage3Mdfr:
[legend]
Collaboration diagram for ContaminationStage3Mdfr:
[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 ()
 

Static Private Attributes

static const int AGENT_THRESHOLD_ACTIVATE = 400
 
static const int AGENT_THRESHOLD_DEACTIVATE = AGENT_THRESHOLD_ACTIVATE - 1
 
static const int AGENT_THRESHOLD_FEVER = 250
 
static const float DAMAGE_PER_SEC = -3
 

Detailed Description

Definition at line 1 of file Contamination3.c.

Member Function Documentation

◆ ActivateCondition()

bool ContaminationStage3Mdfr::ActivateCondition ( PlayerBase player)
inlineprotected

Definition at line 22 of file Contamination3.c.

23 {
24 return (player.GetSingleAgentCount(eAgents.CHEMICAL_POISON) >= AGENT_THRESHOLD_ACTIVATE);
25
26 }
eAgents
Definition EAgents.c:3
static const int AGENT_THRESHOLD_ACTIVATE

References AGENT_THRESHOLD_ACTIVATE.

Referenced by DeactivateCondition().

◆ DeactivateCondition()

bool ContaminationStage3Mdfr::DeactivateCondition ( PlayerBase player)
inlineprotected

Definition at line 39 of file Contamination3.c.

40 {
42 }
bool ActivateCondition(PlayerBase player)

References ActivateCondition().

◆ GetDebugText()

override string ContaminationStage3Mdfr::GetDebugText ( )
inlineprivate

Definition at line 17 of file Contamination3.c.

18 {
19 return ("Activate threshold: " + AGENT_THRESHOLD_ACTIVATE + "| " + "Deativate threshold: " + AGENT_THRESHOLD_DEACTIVATE);
20 }
static const int AGENT_THRESHOLD_DEACTIVATE

References AGENT_THRESHOLD_ACTIVATE, and AGENT_THRESHOLD_DEACTIVATE.

◆ Init()

override void ContaminationStage3Mdfr::Init ( )
inlineprivate

Definition at line 8 of file Contamination3.c.

9 {
10 m_ID = eModifiers.MDF_CONTAMINATION3;
13 m_SyncID = eModifierSyncIDs.MODIFIER_SYNC_CONTAMINATION2;//using the same sync as stage 2 for now
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
eModifierSyncIDs m_SyncID
float m_TickIntervalActive
float m_TickIntervalInactive
eModifierSyncIDs
const int DEFAULT_TICK_TIME_INACTIVE
const int DEFAULT_TICK_TIME_ACTIVE_SHORT
eModifiers
Definition eModifiers.c:2

References DEFAULT_TICK_TIME_ACTIVE_SHORT, DEFAULT_TICK_TIME_INACTIVE, m_ID, m_SyncID, m_TickIntervalActive, m_TickIntervalInactive, and m_TrackActivatedTime.

◆ OnActivate()

void ContaminationStage3Mdfr::OnActivate ( PlayerBase player)
inlineprotected

Definition at line 28 of file Contamination3.c.

29 {
30 player.IncreaseDiseaseCount();
31 player.GetSymptomManager().QueueUpPrimarySymptom(SymptomIDs.SYMPTOM_VOMIT);
32 }

◆ OnDeactivate()

void ContaminationStage3Mdfr::OnDeactivate ( PlayerBase player)
inlineprotected

Definition at line 34 of file Contamination3.c.

35 {
36 player.DecreaseDiseaseCount();
37 }

◆ OnTick()

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

Definition at line 44 of file Contamination3.c.

45 {
46 if (GetAttachedTime() > 4 && (!player.GetSymptomManager().GetCurrentPrimaryActiveSymptom() || (player.GetSymptomManager().GetCurrentPrimaryActiveSymptom() && player.GetSymptomManager().GetCurrentPrimaryActiveSymptom().GetType() != SymptomIDs.SYMPTOM_VOMIT)))
47 player.AddHealth("", "Shock", -100);
48
49 if (player.IsUnconscious())
50 player.AddHealth("", "", DAMAGE_PER_SEC * deltaT);
51
52 }
float GetAttachedTime()
static const float DAMAGE_PER_SEC

References DAMAGE_PER_SEC, and GetAttachedTime().

Member Data Documentation

◆ AGENT_THRESHOLD_ACTIVATE

const int ContaminationStage3Mdfr::AGENT_THRESHOLD_ACTIVATE = 400
staticprivate

Definition at line 3 of file Contamination3.c.

Referenced by ActivateCondition(), and GetDebugText().

◆ AGENT_THRESHOLD_DEACTIVATE

const int ContaminationStage3Mdfr::AGENT_THRESHOLD_DEACTIVATE = AGENT_THRESHOLD_ACTIVATE - 1
staticprivate

Definition at line 4 of file Contamination3.c.

Referenced by GetDebugText().

◆ AGENT_THRESHOLD_FEVER

const int ContaminationStage3Mdfr::AGENT_THRESHOLD_FEVER = 250
staticprivate

Definition at line 5 of file Contamination3.c.

◆ DAMAGE_PER_SEC

const float ContaminationStage3Mdfr::DAMAGE_PER_SEC = -3
staticprivate

Definition at line 6 of file Contamination3.c.

Referenced by OnTick().


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