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

Protected Member Functions

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

Protected Attributes

float m_NextEvent
 
float m_Time
 

Static Private Attributes

static const int AGENT_THRESHOLD_ACTIVATE = 1
 
static const int AGENT_THRESHOLD_DEACTIVATE = 250
 
static const int AGENT_THRESHOLD_FEVER = 250
 
static const int PAIN_EVENT_INTERVAL_MIN = 18
 
static const int PAIN_EVENT_INTERVAL_MAX = 26
 

Detailed Description

Definition at line 13 of file WoundInfection.c.

Member Function Documentation

◆ ActivateCondition()

bool WoundInfectStage1Mdfr::ActivateCondition ( PlayerBase player)
inlineprotected

Definition at line 39 of file WoundInfection.c.

40 {
41 if (player.GetSingleAgentCount(eAgents.WOUND_AGENT) >= AGENT_THRESHOLD_ACTIVATE && !player.GetModifiersManager().IsModifierActive(eModifiers.MDF_WOUND_INFECTION2))
42 return true;
43 else
44 return false;
45 }
eAgents
Definition EAgents.c:3
static const int AGENT_THRESHOLD_ACTIVATE
eModifiers
Definition eModifiers.c:2

References AGENT_THRESHOLD_ACTIVATE.

Referenced by DeactivateCondition().

◆ DeactivateCondition()

bool WoundInfectStage1Mdfr::DeactivateCondition ( PlayerBase player)
inlineprotected

Definition at line 58 of file WoundInfection.c.

59 {
61 }
bool ActivateCondition(PlayerBase player)

References ActivateCondition().

◆ GetDebugText()

override string WoundInfectStage1Mdfr::GetDebugText ( )
inlineprotected

Definition at line 34 of file WoundInfection.c.

35 {
36 return ("Activate threshold: " + AGENT_THRESHOLD_ACTIVATE + "| " + "Deativate threshold: " + AGENT_THRESHOLD_DEACTIVATE);
37 }
static const int AGENT_THRESHOLD_DEACTIVATE

References AGENT_THRESHOLD_ACTIVATE, and AGENT_THRESHOLD_DEACTIVATE.

◆ Init()

override void WoundInfectStage1Mdfr::Init ( )
inlineprotected

Definition at line 25 of file WoundInfection.c.

26 {
28 m_ID = eModifiers.MDF_WOUND_INFECTION1;
31 m_SyncID = eModifierSyncIDs.MODIFIER_SYNC_WOUND_INFECT_1;
32 }
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

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

◆ OnActivate()

void WoundInfectStage1Mdfr::OnActivate ( PlayerBase player)
inlineprotected

Definition at line 47 of file WoundInfection.c.

48 {
49 player.IncreaseDiseaseCount();
51 }
Definition EnMath.c:7
static const int PAIN_EVENT_INTERVAL_MAX
static const int PAIN_EVENT_INTERVAL_MIN
static float RandomFloatInclusive(float min, float max)
Returns a random float number between and min [inclusive] and max [inclusive].
Definition EnMath.c:106

References m_NextEvent, PAIN_EVENT_INTERVAL_MAX, PAIN_EVENT_INTERVAL_MIN, and Math::RandomFloatInclusive().

◆ OnDeactivate()

void WoundInfectStage1Mdfr::OnDeactivate ( PlayerBase player)
inlineprotected

Definition at line 53 of file WoundInfection.c.

54 {
55 player.DecreaseDiseaseCount();
56 }

◆ OnTick()

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

Definition at line 63 of file WoundInfection.c.

64 {
65
66 m_Time += deltaT;
67
68 if (m_Time >= m_NextEvent)
69 {
70 player.GetSymptomManager().QueueUpPrimarySymptom(SymptomIDs.SYMPTOM_PAIN_LIGHT);
71 m_Time = 0;
73 }
74
75
76 }

References m_NextEvent, m_Time, PAIN_EVENT_INTERVAL_MAX, PAIN_EVENT_INTERVAL_MIN, and Math::RandomFloatInclusive().

Member Data Documentation

◆ AGENT_THRESHOLD_ACTIVATE

const int WoundInfectStage1Mdfr::AGENT_THRESHOLD_ACTIVATE = 1
staticprivate

Definition at line 15 of file WoundInfection.c.

Referenced by ActivateCondition(), and GetDebugText().

◆ AGENT_THRESHOLD_DEACTIVATE

const int WoundInfectStage1Mdfr::AGENT_THRESHOLD_DEACTIVATE = 250
staticprivate

Definition at line 16 of file WoundInfection.c.

Referenced by GetDebugText().

◆ AGENT_THRESHOLD_FEVER

const int WoundInfectStage1Mdfr::AGENT_THRESHOLD_FEVER = 250
staticprivate

Definition at line 17 of file WoundInfection.c.

◆ m_NextEvent

float WoundInfectStage1Mdfr::m_NextEvent
protected

Definition at line 22 of file WoundInfection.c.

Referenced by OnActivate(), and OnTick().

◆ m_Time

float WoundInfectStage1Mdfr::m_Time
protected

Definition at line 23 of file WoundInfection.c.

Referenced by OnTick().

◆ PAIN_EVENT_INTERVAL_MAX

const int WoundInfectStage1Mdfr::PAIN_EVENT_INTERVAL_MAX = 26
staticprivate

Definition at line 20 of file WoundInfection.c.

Referenced by OnActivate(), and OnTick().

◆ PAIN_EVENT_INTERVAL_MIN

const int WoundInfectStage1Mdfr::PAIN_EVENT_INTERVAL_MIN = 18
staticprivate

Definition at line 19 of file WoundInfection.c.

Referenced by OnActivate(), and OnTick().


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