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

Private Member Functions

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

Private Attributes

float m_Time
 
float m_NextEvent
 

Static Private Attributes

static const float EVENT_INTERVAL_MIN = 12
 
static const float EVENT_INTERVAL_MAX = 18
 

Detailed Description

Definition at line 1 of file Fever.c.

Member Function Documentation

◆ ActivateCondition()

override bool FeverMdfr::ActivateCondition ( PlayerBase player)
inlineprivate

Definition at line 18 of file Fever.c.

19 {
20 return (player.GetModifiersManager().IsModifierActive(eModifiers.MDF_CHOLERA) || player.GetModifiersManager().IsModifierActive(eModifiers.MDF_INFLUENZA) || player.GetModifiersManager().IsModifierActive(eModifiers.MDF_WOUND_INFECTION2));
21 }
eModifiers
Definition eModifiers.c:2

Referenced by DeactivateCondition().

◆ DeactivateCondition()

override bool FeverMdfr::DeactivateCondition ( PlayerBase player)
inlineprivate

Definition at line 45 of file Fever.c.

46 {
48 }
override bool ActivateCondition(PlayerBase player)
Definition Fever.c:18

References ActivateCondition().

◆ Init()

override void FeverMdfr::Init ( )
inlineprivate

Definition at line 10 of file Fever.c.

11 {
13 m_ID = eModifiers.MDF_FEVER;
16 m_SyncID = eModifierSyncIDs.MODIFIER_SYNC_FEVER;
17 }
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

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

◆ OnActivate()

override void FeverMdfr::OnActivate ( PlayerBase player)
inlineprivate

Definition at line 23 of file Fever.c.

24 {
25 if (player.m_NotifiersManager)
26 player.m_NotifiersManager.ActivateByType(eNotifiers.NTF_FEVERISH);
27
28 player.GetSymptomManager().QueueUpSecondarySymptom(SymptomIDs.SYMPTOM_FEVERBLUR);
29 }
eNotifiers

◆ OnDeactivate()

override void FeverMdfr::OnDeactivate ( PlayerBase player)
inlineprivate

Definition at line 37 of file Fever.c.

38 {
39 if (player.m_NotifiersManager)
40 player.m_NotifiersManager.DeactivateByType(eNotifiers.NTF_FEVERISH);
41 player.GetSymptomManager().RemoveSecondarySymptom(SymptomIDs.SYMPTOM_FEVERBLUR);
42 }

◆ OnReconnect()

override void FeverMdfr::OnReconnect ( PlayerBase player)
inlineprivate

Definition at line 31 of file Fever.c.

32 {
33 this.OnActivate(player);
34 }
class HumanMovementState OnActivate()
HumanCommandScript fully scriptable command.
Definition human.c:1167

References OnActivate().

◆ OnTick()

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

Definition at line 50 of file Fever.c.

51 {
53 player.GetStatWater().Add(-water_loss);
54
55 m_Time += deltaT;
56
57 if (m_Time >= m_NextEvent)
58 {
59 m_Time = 0;
61
62 player.GetSymptomManager().QueueUpPrimarySymptom(SymptomIDs.SYMPTOM_HOT);
63 }
64 }
float m_NextEvent
Definition Fever.c:4
float m_Time
Definition Fever.c:3
static const float EVENT_INTERVAL_MIN
Definition Fever.c:6
static const float EVENT_INTERVAL_MAX
Definition Fever.c:7
Definition EnMath.c:7
static const float WATER_LOSS_FEVER
static float RandomFloatInclusive(float min, float max)
Returns a random float number between and min [inclusive] and max [inclusive].
Definition EnMath.c:106

References EVENT_INTERVAL_MAX, EVENT_INTERVAL_MIN, m_NextEvent, m_Time, Math::RandomFloatInclusive(), and PlayerConstants::WATER_LOSS_FEVER.

Member Data Documentation

◆ EVENT_INTERVAL_MAX

const float FeverMdfr::EVENT_INTERVAL_MAX = 18
staticprivate

Definition at line 7 of file Fever.c.

Referenced by OnTick().

◆ EVENT_INTERVAL_MIN

const float FeverMdfr::EVENT_INTERVAL_MIN = 12
staticprivate

Definition at line 6 of file Fever.c.

Referenced by OnTick().

◆ m_NextEvent

float FeverMdfr::m_NextEvent
private

Definition at line 4 of file Fever.c.

Referenced by OnTick().

◆ m_Time

float FeverMdfr::m_Time
private

Definition at line 3 of file Fever.c.

Referenced by OnTick().


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