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

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

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)
 

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

const float TOXICITY_CLEANUP_PER_SEC = 1
 
const float VOMIT_THRESHOLD = 70
 

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

Методы

◆ ActivateCondition()

override bool ActivateCondition ( PlayerBase player)
inlineprivate
16 {
17 return true;
18 }

◆ DeactivateCondition()

override bool DeactivateCondition ( PlayerBase player)
inlineprivate
21 {
22 return false;
23 }

◆ Init()

override void Init ( )
inlineprivate
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
overall time this modifier was active
Definition ModifierBase.c:14
void DisableDeactivateCheck()
Definition ModifierBase.c:86
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, DisableDeactivateCheck(), m_ID, m_TickIntervalActive, m_TickIntervalInactive и m_TrackActivatedTime.

◆ OnActivate()

override void OnActivate ( PlayerBase player)
inlineprivate
45 {
46
47 }

◆ OnReconnect()

override void OnReconnect ( PlayerBase player)
inlineprivate
40 {
41
42 }

◆ OnTick()

override void OnTick ( PlayerBase player,
float deltaT )
inlineprivate
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 {
34 symptom.SetDuration(Math.RandomIntInclusive(4,8));
35 }
36 }
37 }
Definition EnMath.c:7
Definition EntityAI.c:95
Definition StateBase.c:2
const float VOMIT_THRESHOLD
Definition Toxicity.c:4
const float TOXICITY_CLEANUP_PER_SEC
Definition Toxicity.c:3
static int RandomIntInclusive(int min, int max)
Returns a random int number between and min [inclusive] and max [inclusive].
Definition EnMath.c:54

Перекрестные ссылки Math::RandomIntInclusive(), TOXICITY_CLEANUP_PER_SEC и VOMIT_THRESHOLD.

Поля

◆ TOXICITY_CLEANUP_PER_SEC

const float TOXICITY_CLEANUP_PER_SEC = 1
private

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

◆ VOMIT_THRESHOLD

const float VOMIT_THRESHOLD = 70
private

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


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