DayZ 1.24
Loading...
Searching...
No Matches
ImmuneSystemMdfr Class Reference
Inheritance diagram for ImmuneSystemMdfr:
[legend]
Collaboration diagram for ImmuneSystemMdfr:
[legend]

Private Member Functions

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)
 

Private Attributes

bool m_HasDisease
 
bool m_HasHealings
 

Detailed Description

Definition at line 1 of file ImmuneSystem.c.

Member Function Documentation

◆ ActivateCondition()

override bool ImmuneSystemMdfr::ActivateCondition ( PlayerBase player)
inlineprivate

Definition at line 15 of file ImmuneSystem.c.

16 {
17 return true;
18 }

◆ DeactivateCondition()

override bool ImmuneSystemMdfr::DeactivateCondition ( PlayerBase player)
inlineprivate

Definition at line 29 of file ImmuneSystem.c.

30 {
31 return false;
32 }

◆ Init()

override void ImmuneSystemMdfr::Init ( )
inlineprivate

Definition at line 5 of file ImmuneSystem.c.

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
void DisableDeactivateCheck()
float m_TickIntervalActive
float m_TickIntervalInactive
const int DEFAULT_TICK_TIME_INACTIVE
const int DEFAULT_TICK_TIME_ACTIVE
eModifiers
Definition eModifiers.c:2

References DEFAULT_TICK_TIME_ACTIVE, DEFAULT_TICK_TIME_INACTIVE, DisableDeactivateCheck(), m_ID, m_TickIntervalActive, m_TickIntervalInactive, and m_TrackActivatedTime.

◆ OnActivate()

override void ImmuneSystemMdfr::OnActivate ( PlayerBase player)
inlineprivate

Definition at line 20 of file ImmuneSystem.c.

21 {
22 }

◆ OnReconnect()

override void ImmuneSystemMdfr::OnReconnect ( PlayerBase player)
inlineprivate

Definition at line 24 of file ImmuneSystem.c.

25 {
26
27 }

◆ OnTick()

override void ImmuneSystemMdfr::OnTick ( PlayerBase player,
float deltaT )
inlineprivate

Definition at line 34 of file ImmuneSystem.c.

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

References m_HasDisease, and m_HasHealings.

Member Data Documentation

◆ m_HasDisease

bool ImmuneSystemMdfr::m_HasDisease
private

Definition at line 3 of file ImmuneSystem.c.

Referenced by OnTick().

◆ m_HasHealings

bool ImmuneSystemMdfr::m_HasHealings
private

Definition at line 4 of file ImmuneSystem.c.

Referenced by OnTick().


The documentation for this class was generated from the following file: