Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
bloodnotfr.c
Go to the documentation of this file.
2 {
3  protected const float DEC_TRESHOLD_LOW = 0;
4  protected const float DEC_TRESHOLD_MED = -12;
5  protected const float DEC_TRESHOLD_HIGH = -22;
6  protected const float INC_TRESHOLD_LOW = 0;
7  protected const float INC_TRESHOLD_MED = 3;
8  protected const float INC_TRESHOLD_HIGH = 6;
9 
10  void BloodNotfr(NotifiersManager manager)
11  {
12  }
13 
14  override int GetNotifierType()
15  {
16  return eNotifiers.NTF_BLOOD;
17  }
18 
19  override void DisplayTendency(float delta)
20  {
21  int tendency = CalculateTendency(delta, INC_TRESHOLD_LOW, INC_TRESHOLD_MED, INC_TRESHOLD_HIGH, DEC_TRESHOLD_LOW, DEC_TRESHOLD_MED, DEC_TRESHOLD_HIGH);
22 
23  //DSLevels level = DetermineLevel( GetObservedValue(), PlayerConstants.THRESHOLD_BLOOD_WARNING, PlayerConstants.THRESHOLD_BLOOD_CRITICAL, PlayerConstants.THRESHOLD_BLOOD_BLINKING, PlayerConstants.THRESHOLD_BLOOD_EXTRA );
24  DisplayElementTendency dis_elm = DisplayElementTendency.Cast(GetVirtualHud().GetElement(eDisplayElements.DELM_TDCY_BLOOD));
25 
26  EStatLevels blood_level = m_Player.GetStatLevelBlood();
27 
28  if( dis_elm )
29  {
30  dis_elm.SetTendency(tendency);
31  dis_elm.SetSeriousnessLevel(blood_level);
32 
33  }
34 
35  }
36 
37  override float GetObservedValue()
38  {
39  float blood = m_Player.GetHealth("GlobalHealth","Blood");
40  return blood;
41  }
42 };
BloodNotfr
Definition: bloodnotfr.c:1
GetElement
DisplayElementBase GetElement(eDisplayElements element_id)
Definition: displaystatus.c:95
DisplayElementTendency
Definition: tendencybacteria.c:1
GetVirtualHud
VirtualHud GetVirtualHud()
Definition: notifiersmanager.c:77
NotifiersManager
void NotifiersManager(PlayerBase player)
Definition: notifiersmanager.c:36
m_Player
DayZPlayer m_Player
Definition: hand_events.c:42
NotifierBase
Definition: notifierbase.c:1
eNotifiers
eNotifiers
Definition: notifiersmanager.c:1
EStatLevels
EStatLevels
Definition: estatlevels.c:1