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

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

void OnActivate (PlayerBase player)
 
void OnDeactivate (PlayerBase player)
 
bool DeactivateCondition (PlayerBase player)
 
void OnTick (PlayerBase player, float deltaT)
 

Закрытые члены

override void Init ()
 
override string GetDebugText ()
 
override bool ActivateCondition (PlayerBase player)
 

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

const int AGENT_THRESHOLD_ACTIVATE = 100
 
const int AGENT_THRESHOLD_DEACTIVATE = 0
 
const int SNEEZE_RND_DIVIDER_NORMAL_MIN = 15
 
const int SNEEZE_RND_DIVIDER_NORMAL_MAX = 20
 
const int SNEEZE_RND_DIVIDER_SUPPRESSED_MIN = 30
 
const int SNEEZE_RND_DIVIDER_SUPPRESSED_MAX = 40
 
const int TEMPORARY_RESISTANCE_TIME = 900
 
ModifiersManager m_ModifiersManager
 

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

Методы

◆ ActivateCondition()

override bool ActivateCondition ( PlayerBase player)
inlineprivate
30 {
31 if (player.GetSingleAgentCount(eAgents.INFLUENZA) >= AGENT_THRESHOLD_ACTIVATE)
32 return true;
33
34 return false;
35 }
eAgents
Definition EAgents.c:3
const int AGENT_THRESHOLD_ACTIVATE
Definition CommonCold.c:3
Definition EntityAI.c:95

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

◆ DeactivateCondition()

bool DeactivateCondition ( PlayerBase player)
inlineprotected
53 {
54 return (player.GetSingleAgentCount(eAgents.INFLUENZA) <= AGENT_THRESHOLD_DEACTIVATE);
55 }
const int AGENT_THRESHOLD_DEACTIVATE
Definition CommonCold.c:4

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

◆ GetDebugText()

override string GetDebugText ( )
inlineprivate
25 {
26 return ("Activate threshold: "+AGENT_THRESHOLD_ACTIVATE + "| " +"Deativate threshold: "+AGENT_THRESHOLD_DEACTIVATE);
27 }

Перекрестные ссылки AGENT_THRESHOLD_ACTIVATE и AGENT_THRESHOLD_DEACTIVATE.

◆ Init()

override void Init ( )
inlineprivate
16 {
19 m_ID = eModifiers.MDF_COMMON_COLD;
22 }
int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
Definition Effect.c:49
bool m_TrackActivatedTime
overall time this modifier was active
Definition ModifierBase.c:14
bool m_AnalyticsStatsEnabled
Definition ModifierBase.c:31
float m_TickIntervalActive
Definition ModifierBase.c:18
float m_TickIntervalInactive
Definition ModifierBase.c:17
const int DEFAULT_TICK_TIME_INACTIVE
Definition ModifiersManager.c:29
enum eModifierSyncIDs DEFAULT_TICK_TIME_ACTIVE
eModifiers
Definition eModifiers.c:2

Перекрестные ссылки DEFAULT_TICK_TIME_ACTIVE, DEFAULT_TICK_TIME_INACTIVE, m_AnalyticsStatsEnabled, m_ID, m_TickIntervalActive, m_TickIntervalInactive и m_TrackActivatedTime.

◆ OnActivate()

void OnActivate ( PlayerBase player)
inlineprotected
38 {
39 player.IncreaseDiseaseCount();
40
41 m_ModifiersManager = player.GetModifiersManager();
42 player.GetSymptomManager().QueueUpPrimarySymptom(SymptomIDs.SYMPTOM_SNEEZE);
43 }
ModifiersManager m_ModifiersManager
Definition CommonCold.c:13

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

◆ OnDeactivate()

void OnDeactivate ( PlayerBase player)
inlineprotected
46 {
47 player.DecreaseDiseaseCount();
48
49 player.SetTemporaryResistanceToAgent(eAgents.INFLUENZA, TEMPORARY_RESISTANCE_TIME);
50 }
const int TEMPORARY_RESISTANCE_TIME
Definition CommonCold.c:11

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

◆ OnTick()

void OnTick ( PlayerBase player,
float deltaT )
inlineprotected
58 {
59 float chanceOfSneeze = Math.Clamp(player.GetSingleAgentCountNormalized(eAgents.INFLUENZA),0.4,0.75);
60
62 if (m_ModifiersManager.IsModifierActive(eModifiers.MDF_PAINKILLERS) || m_ModifiersManager.IsModifierActive(eModifiers.MDF_MORPHINE))
64
66 {
67 player.GetSymptomManager().QueueUpPrimarySymptom(SymptomIDs.SYMPTOM_SNEEZE);
68 }
69 }
const int SNEEZE_RND_DIVIDER_SUPPRESSED_MAX
Definition CommonCold.c:9
const int SNEEZE_RND_DIVIDER_NORMAL_MIN
Definition CommonCold.c:6
const int SNEEZE_RND_DIVIDER_SUPPRESSED_MIN
Definition CommonCold.c:8
const int SNEEZE_RND_DIVIDER_NORMAL_MAX
Definition CommonCold.c:7
Definition EnMath.c:7
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].
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 RandomFloat01()
Returns a random float number between and min [inclusive] and max [inclusive].
Definition EnMath.c:126

Перекрестные ссылки Math::Clamp(), m_ModifiersManager, Math::RandomFloat01(), Math::RandomInt(), SNEEZE_RND_DIVIDER_NORMAL_MAX, SNEEZE_RND_DIVIDER_NORMAL_MIN, SNEEZE_RND_DIVIDER_SUPPRESSED_MAX и SNEEZE_RND_DIVIDER_SUPPRESSED_MIN.

Поля

◆ AGENT_THRESHOLD_ACTIVATE

const int AGENT_THRESHOLD_ACTIVATE = 100
private

Используется в ActivateCondition(), GetDebugText() и InfluenzaAgent::Init().

◆ AGENT_THRESHOLD_DEACTIVATE

const int AGENT_THRESHOLD_DEACTIVATE = 0
private

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

◆ m_ModifiersManager

ModifiersManager m_ModifiersManager
private

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

◆ SNEEZE_RND_DIVIDER_NORMAL_MAX

const int SNEEZE_RND_DIVIDER_NORMAL_MAX = 20
private

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

◆ SNEEZE_RND_DIVIDER_NORMAL_MIN

const int SNEEZE_RND_DIVIDER_NORMAL_MIN = 15
private

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

◆ SNEEZE_RND_DIVIDER_SUPPRESSED_MAX

const int SNEEZE_RND_DIVIDER_SUPPRESSED_MAX = 40
private

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

◆ SNEEZE_RND_DIVIDER_SUPPRESSED_MIN

const int SNEEZE_RND_DIVIDER_SUPPRESSED_MIN = 30
private

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

◆ TEMPORARY_RESISTANCE_TIME

const int TEMPORARY_RESISTANCE_TIME = 900
private

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


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