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

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

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

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

bool m_HasDisease
 
bool m_HasHealings
 

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

Методы

◆ ActivateCondition()

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

◆ DeactivateCondition()

override bool DeactivateCondition ( PlayerBase player)
inlineprivate
30 {
31 return false;
32 }

◆ Init()

override void Init ( )
inlineprivate
6 {
8 m_ID = eModifiers.MDF_IMMUNE_SYSTEM;
11
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
21 {
22 }

◆ OnReconnect()

override void OnReconnect ( PlayerBase player)
inlineprivate
25 {
26
27 }

◆ OnTick()

override void OnTick ( PlayerBase player,
float deltaT )
inlineprivate
35 {
36// Debug.Log("ticking immune system", "agent");
37 float result = player.GetImmunity() * deltaT;
38 player.ImmuneSystemTick(result, deltaT);
39// Debug.Log("result: "+result.ToString(), "agent");
40
41 if( m_HasDisease != player.HasDisease() )
42 {
43 if(player.HasDisease())
44 {
45 if( player.GetNotifiersManager() ) player.GetNotifiersManager().ActivateByType(eNotifiers.NTF_SICK);
46 }
47 else
48 {
49 if( player.GetNotifiersManager() ) player.GetNotifiersManager().DeactivateByType(eNotifiers.NTF_SICK);
50 }
51 m_HasDisease = player.HasDisease();
52 }
53
54
55 if( m_HasHealings != player.HasHealings() )
56 {
57
58 if( player.HasHealings() )
59 {
60 if( player.GetNotifiersManager() )
61 player.GetNotifiersManager().ActivateByType(eNotifiers.NTF_PILLS);
62 }
63 else
64 {
65 if( player.GetNotifiersManager() )
66 player.GetNotifiersManager().DeactivateByType(eNotifiers.NTF_PILLS);
67 }
68 m_HasHealings = player.HasHealings();
69 }
70
71 }
eNotifiers
Definition NotifiersManager.c:2
bool m_HasHealings
Definition ImmuneSystem.c:4
bool m_HasDisease
Definition ImmuneSystem.c:3
Definition EntityAI.c:95

Перекрестные ссылки m_HasDisease и m_HasHealings.

Поля

◆ m_HasDisease

bool m_HasDisease
private

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

◆ m_HasHealings

bool m_HasHealings
private

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


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