Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
healthnotfr.c
Go to the documentation of this file.
1
class
HealthNotfr
:
NotifierBase
2
{
3
/*
4
private const float HEALTHY_BLOOD_TRESHOLD = 5000;
5
private const float HEALTHY_TRESHOLD = 5000;
6
private const float HEALING_ENERGY_TRESHOLD = 4000;
7
private const float HEALING_WATER_TRESHOLD = 2500;
8
private const float HEALING_BLOOD_TRESHOLD = 5000;
9
*/
10
private
const
float
DEC_TRESHOLD_LOW
= 0;
11
private
const
float
DEC_TRESHOLD_MED
= -0.7;
12
private
const
float
DEC_TRESHOLD_HIGH
= -1.3;
13
private
const
float
INC_TRESHOLD_LOW
= 0;
14
private
const
float
INC_TRESHOLD_MED
= 0.7;
15
private
const
float
INC_TRESHOLD_HIGH
= 1.3;
16
17
18
void
HealthNotfr
(
NotifiersManager
manager)
19
{
20
m_TickInterval
= 3000;
21
m_TendencyBufferSize
= 6;
22
}
23
24
override
int
GetNotifierType
()
25
{
26
return
eNotifiers
.NTF_HEALTHY;
27
}
28
29
override
void
DisplayTendency
(
float
delta)
30
{
31
int
tendency =
CalculateTendency
(delta,
INC_TRESHOLD_LOW
,
INC_TRESHOLD_MED
,
INC_TRESHOLD_HIGH
,
DEC_TRESHOLD_LOW
,
DEC_TRESHOLD_MED
,
DEC_TRESHOLD_HIGH
);
32
//PrintString("tendency:" + tendency);
33
//GetVirtualHud().SetStatus(eDisplayElements.DELM_TDCY_HEALTH,tendency);
34
35
//DSLevels level = DetermineLevel( GetObservedValue(), PlayerConstants.THRESHOLD_HEALTH_WARNING, PlayerConstants.THRESHOLD_HEALTH_CRITICAL, PlayerConstants.THRESHOLD_HEALTH_BLINKING, PlayerConstants.THRESHOLD_HEALTH_EXTRA);
36
37
EStatLevels
health_level =
m_Player
.GetStatLevelHealth();
38
DisplayElementTendency
dis_elm =
DisplayElementTendency
.Cast(
GetVirtualHud
().
GetElement
(eDisplayElements.DELM_TDCY_HEALTH));
39
40
if
( dis_elm )
41
{
42
dis_elm.SetSeriousnessLevel(health_level);
43
dis_elm.SetTendency(tendency);
44
}
45
}
46
47
override
protected
float
GetObservedValue
()
48
{
49
return
m_Player
.GetHealth(
""
,
"Health"
);
50
}
51
};
DisplayElementTendency
Definition
tendencybacteria.c:2
HealthNotfr::DEC_TRESHOLD_MED
const float DEC_TRESHOLD_MED
Definition
healthnotfr.c:11
HealthNotfr::GetObservedValue
float GetObservedValue()
Definition
healthnotfr.c:47
HealthNotfr::DisplayTendency
override void DisplayTendency(float delta)
Definition
healthnotfr.c:29
HealthNotfr::INC_TRESHOLD_LOW
const float INC_TRESHOLD_LOW
Definition
healthnotfr.c:13
HealthNotfr::DEC_TRESHOLD_HIGH
const float DEC_TRESHOLD_HIGH
Definition
healthnotfr.c:12
HealthNotfr::INC_TRESHOLD_MED
const float INC_TRESHOLD_MED
Definition
healthnotfr.c:14
HealthNotfr::DEC_TRESHOLD_LOW
const float DEC_TRESHOLD_LOW
Definition
healthnotfr.c:10
HealthNotfr::HealthNotfr
void HealthNotfr(NotifiersManager manager)
Definition
healthnotfr.c:18
HealthNotfr::GetNotifierType
override int GetNotifierType()
Definition
healthnotfr.c:24
HealthNotfr::INC_TRESHOLD_HIGH
const float INC_TRESHOLD_HIGH
Definition
healthnotfr.c:15
NotifierBase::CalculateTendency
int CalculateTendency(float delta, float inctresholdlow, float inctresholdmed, float inctresholdhigh, float dectresholdlow, float dectresholdmed, float dectresholdhigh)
Definition
notifierbase.c:166
NotifierBase::m_Player
PlayerBase m_Player
Definition
notifierbase.c:5
NotifierBase::GetVirtualHud
VirtualHud GetVirtualHud()
Definition
notifierbase.c:49
NotifierBase::NotifierBase
void NotifierBase(NotifiersManager manager)
Definition
notifierbase.c:22
NotifierBase::m_TickInterval
int m_TickInterval
Definition
notifierbase.c:12
NotifierBase::m_TendencyBufferSize
int m_TendencyBufferSize
Definition
notifierbase.c:8
GetElement
DisplayElementBase GetElement(eDisplayElements element_id)
Definition
displaystatus.c:96
EStatLevels
EStatLevels
Definition
estatlevels.c:2
NotifiersManager
void NotifiersManager(PlayerBase player)
Definition
notifiersmanager.c:37
eNotifiers
eNotifiers
Definition
notifiersmanager.c:3
Games
Dayz
scripts
4_world
classes
playernotifiers
notifiers
healthnotfr.c
Generated by
1.17.0