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

Private Member Functions

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

Private Attributes

const float TOXICITY_CLEANUP_PER_SEC = 1
 
const float VOMIT_THRESHOLD = 70
 

Detailed Description

Definition at line 1 of file Toxicity.c.

Member Function Documentation

◆ ActivateCondition()

override bool ToxicityMdfr::ActivateCondition ( PlayerBase player)
inlineprivate

Definition at line 15 of file Toxicity.c.

16 {
17 return true;
18 }

◆ DeactivateCondition()

override bool ToxicityMdfr::DeactivateCondition ( PlayerBase player)
inlineprivate

Definition at line 20 of file Toxicity.c.

21 {
22 return false;
23 }

◆ Init()

override void ToxicityMdfr::Init ( )
inlineprivate

Definition at line 6 of file Toxicity.c.

7 {
9 m_ID = eModifiers.MDF_TOXICITY;
13 }
int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
Definition Effect.c:49
bool m_TrackActivatedTime
void DisableDeactivateCheck()
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, DisableDeactivateCheck(), m_ID, m_TickIntervalActive, m_TickIntervalInactive, and m_TrackActivatedTime.

◆ OnActivate()

override void ToxicityMdfr::OnActivate ( PlayerBase player)
inlineprivate

Definition at line 42 of file Toxicity.c.

43 {
44
45 }

◆ OnReconnect()

override void ToxicityMdfr::OnReconnect ( PlayerBase player)
inlineprivate

Definition at line 37 of file Toxicity.c.

38 {
39
40 }

◆ OnTick()

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

Definition at line 25 of file Toxicity.c.

26 {
27 player.GetStatToxicity().Add(-TOXICITY_CLEANUP_PER_SEC * deltaT);
28 if (player.GetStatToxicity().Get() > VOMIT_THRESHOLD)
29 {
30 SymptomBase symptom = player.GetSymptomManager().QueueUpPrimarySymptom(SymptomIDs.SYMPTOM_VOMIT);
31
32 if (symptom)
33 symptom.SetDuration(Math.RandomIntInclusive(4, 8));
34 }
35 }
Definition EnMath.c:7
const float TOXICITY_CLEANUP_PER_SEC
Definition Toxicity.c:3
const float VOMIT_THRESHOLD
Definition Toxicity.c:4
static int RandomIntInclusive(int min, int max)
Returns a random int number between and min [inclusive] and max [inclusive].
Definition EnMath.c:54

References Math::RandomIntInclusive(), TOXICITY_CLEANUP_PER_SEC, and VOMIT_THRESHOLD.

Member Data Documentation

◆ TOXICITY_CLEANUP_PER_SEC

const float ToxicityMdfr::TOXICITY_CLEANUP_PER_SEC = 1
private

Definition at line 3 of file Toxicity.c.

Referenced by OnTick().

◆ VOMIT_THRESHOLD

const float ToxicityMdfr::VOMIT_THRESHOLD = 70
private

Definition at line 4 of file Toxicity.c.

Referenced by OnTick().


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