DayZ 1.24
Loading...
Searching...
No Matches
ImmuneSystem.c
Go to the documentation of this file.
2{
14
16 {
17 return true;
18 }
19
21 {
22 }
23
25 {
26
27 }
28
30 {
31 return false;
32 }
33
34 override void OnTick(PlayerBase player, float deltaT)
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 }
72
73};
int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
Definition Effect.c:49
bool m_TrackActivatedTime
void DisableDeactivateCheck()
float m_TickIntervalActive
float m_TickIntervalInactive
const int DEFAULT_TICK_TIME_INACTIVE
const int DEFAULT_TICK_TIME_ACTIVE
eNotifiers
override void OnReconnect(PlayerBase player)
override void OnActivate(PlayerBase player)
override bool ActivateCondition(PlayerBase player)
override void OnTick(PlayerBase player, float deltaT)
override bool DeactivateCondition(PlayerBase player)
override void Init()
Definition ImmuneSystem.c:5
eModifiers
Definition eModifiers.c:2