DayZ 1.24
Loading...
Searching...
No Matches
FatigueMdfr Class Reference
Inheritance diagram for FatigueMdfr:
[legend]
Collaboration diagram for FatigueMdfr:
[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 FATIGUE_EVENT_INTERVAL_MIN = 5
 
static const float FATIGUE_EVENT_INTERVAL_MAX = 12
 
static const float STAMINA_RECOVERY_MULTIPLIER = 0.33
 
static const float STAMINA_DEPLETION_MULTIPLIER = 1.33
 

Detailed Description

Definition at line 1 of file Fatigue.c.

Member Function Documentation

◆ ActivateCondition()

override bool FatigueMdfr::ActivateCondition ( PlayerBase player)
inlineprivate

Definition at line 19 of file Fatigue.c.

20 {
21 return (player.GetModifiersManager().IsModifierActive(eModifiers.MDF_WOUND_INFECTION1) || player.GetModifiersManager().IsModifierActive(eModifiers.MDF_POISONING) || player.GetModifiersManager().IsModifierActive(eModifiers.MDF_WOUND_INFECTION2));
22 }
eModifiers
Definition eModifiers.c:2

Referenced by DeactivateCondition().

◆ DeactivateCondition()

override bool FatigueMdfr::DeactivateCondition ( PlayerBase player)
inlineprivate

Definition at line 49 of file Fatigue.c.

50 {
52 }
override bool ActivateCondition(PlayerBase player)
Definition Fatigue.c:19

References ActivateCondition().

◆ Init()

override void FatigueMdfr::Init ( )
inlineprivate

Definition at line 11 of file Fatigue.c.

12 {
14 m_ID = eModifiers.MDF_FATIGUE;
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
float m_TickIntervalActive
float m_TickIntervalInactive
const int DEFAULT_TICK_TIME_ACTIVE
const int DEFAULT_TICK_TIME_INACTIVE_LONG

References DEFAULT_TICK_TIME_ACTIVE, DEFAULT_TICK_TIME_INACTIVE_LONG, m_ID, m_TickIntervalActive, m_TickIntervalInactive, and m_TrackActivatedTime.

◆ OnActivate()

override void FatigueMdfr::OnActivate ( PlayerBase player)
inlineprivate

Definition at line 24 of file Fatigue.c.

25 {
26 if (player.m_NotifiersManager)
27 player.m_NotifiersManager.ActivateByType(eNotifiers.NTF_FEVERISH);
28
29
30 player.GetStaminaHandler().ActivateRecoveryModifier(EStaminaMultiplierTypes.FATIGUE);
31 player.GetStaminaHandler().ActivateDepletionModifier(EStaminaMultiplierTypes.FATIGUE);
32
33 }
eNotifiers
EStaminaMultiplierTypes

◆ OnDeactivate()

override void FatigueMdfr::OnDeactivate ( PlayerBase player)
inlineprivate

Definition at line 41 of file Fatigue.c.

42 {
43 //player.GetStaminaHandler().SetDepletionMultiplier(1);
44 player.GetStaminaHandler().DeactivateRecoveryModifier(EStaminaMultiplierTypes.FATIGUE);
45 player.GetStaminaHandler().DeactivateDepletionModifier(EStaminaMultiplierTypes.FATIGUE);
46 }

◆ OnReconnect()

override void FatigueMdfr::OnReconnect ( PlayerBase player)
inlineprivate

Definition at line 35 of file Fatigue.c.

36 {
37 this.OnActivate(player);
38 }
class HumanMovementState OnActivate()
HumanCommandScript fully scriptable command.
Definition human.c:1167

References OnActivate().

◆ OnTick()

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

Definition at line 54 of file Fatigue.c.

55 {
56
57 }

Member Data Documentation

◆ FATIGUE_EVENT_INTERVAL_MAX

const float FatigueMdfr::FATIGUE_EVENT_INTERVAL_MAX = 12
staticprivate

Definition at line 7 of file Fatigue.c.

◆ FATIGUE_EVENT_INTERVAL_MIN

const float FatigueMdfr::FATIGUE_EVENT_INTERVAL_MIN = 5
staticprivate

Definition at line 6 of file Fatigue.c.

◆ m_NextEvent

float FatigueMdfr::m_NextEvent
private

Definition at line 4 of file Fatigue.c.

◆ m_Time

float FatigueMdfr::m_Time
private

Definition at line 3 of file Fatigue.c.

◆ STAMINA_DEPLETION_MULTIPLIER

const float FatigueMdfr::STAMINA_DEPLETION_MULTIPLIER = 1.33
staticprivate

Definition at line 9 of file Fatigue.c.

Referenced by StaminaHandler::Init().

◆ STAMINA_RECOVERY_MULTIPLIER

const float FatigueMdfr::STAMINA_RECOVERY_MULTIPLIER = 0.33
staticprivate

Definition at line 8 of file Fatigue.c.

Referenced by StaminaHandler::Init().


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