DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс InfluenzaAgent
+ Граф наследования:InfluenzaAgent:

Защищенные члены

override void Init ()
 
override bool AutoinfectCheck (float deltaT, PlayerBase player)
 
override bool CanAutoinfectPlayer (PlayerBase player)
 
override float GetInvasibilityEx (PlayerBase player)
 
override EStatLevels GetPotencyEx (PlayerBase player)
 
override float GetDieOffSpeedEx (PlayerBase player)
 

Защищенные данные

const float INVASIBILITY_INC_LOW_HC = 0.40
 
const float INVASIBILITY_INC_MEDIUM_HC = 0.60
 
const float INVASIBILITY_INC_CRITICAL_HC = 0.70
 
const float INVASIBILITY_DEC_COMMON_COLD = -0.3
 
const float INVASIBILITY_DEC_INFLUENZA = -0.3
 
const float INVASIBILITY_DEC_PNEUMONIA = 0.00
 
const int MAX_TIME_TO_CONTRACT = 8650
 
const int CONTRACT_TIME_THRESHOLD_MIN = 10
 at this time [s], character will contract the disease
 
const int CONTRACT_TIME_THRESHOLD_MAX = 200
 min value of time [s] for subtraction from MAX_TIME_TO_CONTRACT (used for randomization)
 
int m_TimeToContract = MAX_TIME_TO_CONTRACT
 max value of time [s] for subtraction from MAX_TIME_TO_CONTRACT (used for randomization)
 
const float CONTRACT_HEATCOMFORT_MODIFIER [3]
 
int m_ElapsedTime
 

Закрытые данные

const float INFLUENZA_AGENT_AUTOINFECT_THRESHOLD_HC = PlayerConstants.THRESHOLD_HEAT_COMFORT_MINUS_WARNING
 

Подробное описание

Методы

◆ AutoinfectCheck()

override bool AutoinfectCheck ( float deltaT,
PlayerBase player )
inlineprotected
45 {
46 if (!player.m_AgentPool.GetTemporaryResistance(eAgents.INFLUENZA))
47 {
48 float heatcomfort = player.GetStatHeatComfort().Get();
50 {
53
60
62
65 {
66 m_ElapsedTime = 0;
68
69 return true;
70 }
71
73 }
74 else
75 {
78 }
79 }
80
81 return false;
82 }
eAgents
Definition EAgents.c:3
const int MAX
Definition EnConvert.c:27
const float CONTRACT_HEATCOMFORT_MODIFIER[3]
Definition InfluenzaAgent.c:19
const int CONTRACT_TIME_THRESHOLD_MAX
min value of time [s] for subtraction from MAX_TIME_TO_CONTRACT (used for randomization)
Definition InfluenzaAgent.c:15
int m_TimeToContract
max value of time [s] for subtraction from MAX_TIME_TO_CONTRACT (used for randomization)
Definition InfluenzaAgent.c:17
int m_ElapsedTime
Definition InfluenzaAgent.c:25
const int MAX_TIME_TO_CONTRACT
Definition InfluenzaAgent.c:13
const int CONTRACT_TIME_THRESHOLD_MIN
at this time [s], character will contract the disease
Definition InfluenzaAgent.c:14
Definition EnMath.c:7
Definition EntityAI.c:95
Definition PlayerConstants.c:2
static const float THRESHOLD_HEAT_COMFORT_MINUS_WARNING
Definition PlayerConstants.c:84
static const float THRESHOLD_HEAT_COMFORT_MINUS_CRITICAL
Definition PlayerConstants.c:85
static const float THRESHOLD_HEAT_COMFORT_MINUS_EMPTY
Definition PlayerConstants.c:86
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
static float RandomFloatInclusive(float min, float max)
Returns a random float number between and min [inclusive] and max [inclusive].
Definition EnMath.c:106

Перекрестные ссылки Math::Clamp(), CONTRACT_HEATCOMFORT_MODIFIER, CONTRACT_TIME_THRESHOLD_MAX, CONTRACT_TIME_THRESHOLD_MIN, m_ElapsedTime, m_TimeToContract, MAX, MAX_TIME_TO_CONTRACT, Math::RandomFloatInclusive(), PlayerConstants::THRESHOLD_HEAT_COMFORT_MINUS_CRITICAL, PlayerConstants::THRESHOLD_HEAT_COMFORT_MINUS_EMPTY и PlayerConstants::THRESHOLD_HEAT_COMFORT_MINUS_WARNING.

◆ CanAutoinfectPlayer()

override bool CanAutoinfectPlayer ( PlayerBase player)
inlineprotected
85 {
86 if (player.GetStatHeatComfort().Get() < INFLUENZA_AGENT_AUTOINFECT_THRESHOLD_HC)
87 return true;
88
89 return false;
90 }
const float INFLUENZA_AGENT_AUTOINFECT_THRESHOLD_HC
Definition InfluenzaAgent.c:3

Перекрестные ссылки INFLUENZA_AGENT_AUTOINFECT_THRESHOLD_HC.

◆ GetDieOffSpeedEx()

override float GetDieOffSpeedEx ( PlayerBase player)
inlineprotected
125 {
126 if (player.GetModifiersManager().IsModifierActive(eModifiers.MDF_ANTIBIOTICS))
127 return GetDieOffSpeed() * 3;
128 else if (player.GetModifiersManager().IsModifierActive(eModifiers.MDF_IMMUNITYBOOST))
129 return GetDieOffSpeed() * 2;
130
131 return super.GetDieOffSpeedEx(player);
132 }
float GetDieOffSpeed()
Definition AgentBase.c:49
eModifiers
Definition eModifiers.c:2

Перекрестные ссылки AgentBase::GetDieOffSpeed().

◆ GetInvasibilityEx()

override float GetInvasibilityEx ( PlayerBase player)
inlineprotected
93 {
94 float heatComfort = player.GetStatHeatComfort().Get();
95
97 {
98 if (player.GetModifiersManager().IsModifierActive(eModifiers.MDF_PNEUMONIA))
100 if (player.GetModifiersManager().IsModifierActive(eModifiers.MDF_INFLUENZA))
102
104 }
105
112
114 }
const float INVASIBILITY_INC_LOW_HC
Definition InfluenzaAgent.c:5
const float INVASIBILITY_DEC_INFLUENZA
Definition InfluenzaAgent.c:10
const float INVASIBILITY_DEC_COMMON_COLD
Definition InfluenzaAgent.c:9
const float INVASIBILITY_INC_CRITICAL_HC
Definition InfluenzaAgent.c:7
const float INVASIBILITY_INC_MEDIUM_HC
Definition InfluenzaAgent.c:6
const float INVASIBILITY_DEC_PNEUMONIA
Definition InfluenzaAgent.c:11

Перекрестные ссылки INVASIBILITY_DEC_COMMON_COLD, INVASIBILITY_DEC_INFLUENZA, INVASIBILITY_DEC_PNEUMONIA, INVASIBILITY_INC_CRITICAL_HC, INVASIBILITY_INC_LOW_HC, INVASIBILITY_INC_MEDIUM_HC, PlayerConstants::THRESHOLD_HEAT_COMFORT_MINUS_CRITICAL, PlayerConstants::THRESHOLD_HEAT_COMFORT_MINUS_EMPTY и PlayerConstants::THRESHOLD_HEAT_COMFORT_MINUS_WARNING.

◆ GetPotencyEx()

override EStatLevels GetPotencyEx ( PlayerBase player)
inlineprotected
117 {
118 if (player.GetModifiersManager().IsModifierActive(eModifiers.MDF_PNEUMONIA))
119 return EStatLevels.GREAT;
120
121 return super.GetPotencyEx(player);
122 }
EStatLevels
Definition EStatLevels.c:2

◆ Init()

override void Init ( )
inlineprotected
28 {
29 m_Type = eAgents.INFLUENZA;
30 m_Invasibility = 0.33;
33 m_MaxCount = 1200;
34 m_Digestibility = 0.1;
38 m_Potency = EStatLevels.MEDIUM;
39 m_DieOffSpeed = 0.30;
40
41 m_ElapsedTime = 0.0;
42 }
int m_AutoinfectCount
Definition AgentBase.c:9
float m_TransferabilityOut
Definition AgentBase.c:6
float m_TransferabilityIn
Definition AgentBase.c:5
float m_TransferabilityAirOut
Definition AgentBase.c:11
int m_MaxCount
Definition AgentBase.c:8
float m_DieOffSpeed
Definition AgentBase.c:15
float m_Type
Definition AgentBase.c:3
float m_Invasibility
Definition AgentBase.c:4
EStatLevels m_Potency
Definition AgentBase.c:14
float m_Digestibility
Definition AgentBase.c:7
float m_AntibioticsResistance
Definition AgentBase.c:12
Definition CommonCold.c:2
const int AGENT_THRESHOLD_ACTIVATE
Definition CommonCold.c:3

Перекрестные ссылки CommonColdMdfr::AGENT_THRESHOLD_ACTIVATE, AgentBase::m_AntibioticsResistance, AgentBase::m_AutoinfectCount, AgentBase::m_DieOffSpeed, AgentBase::m_Digestibility, m_ElapsedTime, AgentBase::m_Invasibility, AgentBase::m_MaxCount, AgentBase::m_Potency, AgentBase::m_TransferabilityAirOut, AgentBase::m_TransferabilityIn, AgentBase::m_TransferabilityOut и AgentBase::m_Type.

Поля

◆ CONTRACT_HEATCOMFORT_MODIFIER

const float CONTRACT_HEATCOMFORT_MODIFIER[3]
protected
Инициализатор
= {
0.25,
0.6,
1.0,
}
19 {
20 0.25, // low
21 0.6, // medium
22 1.0, // critical
23 };

Используется в AutoinfectCheck().

◆ CONTRACT_TIME_THRESHOLD_MAX

const int CONTRACT_TIME_THRESHOLD_MAX = 200
protected

min value of time [s] for subtraction from MAX_TIME_TO_CONTRACT (used for randomization)

Используется в AutoinfectCheck().

◆ CONTRACT_TIME_THRESHOLD_MIN

const int CONTRACT_TIME_THRESHOLD_MIN = 10
protected

at this time [s], character will contract the disease

Используется в AutoinfectCheck().

◆ INFLUENZA_AGENT_AUTOINFECT_THRESHOLD_HC

const float INFLUENZA_AGENT_AUTOINFECT_THRESHOLD_HC = PlayerConstants.THRESHOLD_HEAT_COMFORT_MINUS_WARNING
private

Используется в CanAutoinfectPlayer().

◆ INVASIBILITY_DEC_COMMON_COLD

const float INVASIBILITY_DEC_COMMON_COLD = -0.3
protected

Используется в GetInvasibilityEx().

◆ INVASIBILITY_DEC_INFLUENZA

const float INVASIBILITY_DEC_INFLUENZA = -0.3
protected

Используется в GetInvasibilityEx().

◆ INVASIBILITY_DEC_PNEUMONIA

const float INVASIBILITY_DEC_PNEUMONIA = 0.00
protected

Используется в GetInvasibilityEx().

◆ INVASIBILITY_INC_CRITICAL_HC

const float INVASIBILITY_INC_CRITICAL_HC = 0.70
protected

Используется в GetInvasibilityEx().

◆ INVASIBILITY_INC_LOW_HC

const float INVASIBILITY_INC_LOW_HC = 0.40
protected

Используется в GetInvasibilityEx().

◆ INVASIBILITY_INC_MEDIUM_HC

const float INVASIBILITY_INC_MEDIUM_HC = 0.60
protected

Используется в GetInvasibilityEx().

◆ m_ElapsedTime

int m_ElapsedTime
protected

Используется в AutoinfectCheck() и Init().

◆ m_TimeToContract

int m_TimeToContract = MAX_TIME_TO_CONTRACT
protected

max value of time [s] for subtraction from MAX_TIME_TO_CONTRACT (used for randomization)

Используется в AutoinfectCheck().

◆ MAX_TIME_TO_CONTRACT

const int MAX_TIME_TO_CONTRACT = 8650
protected

Используется в AutoinfectCheck().


Объявления и описания членов класса находятся в файле: