Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
stuffedstomach.c
Go to the documentation of this file.
2 {
3  protected const int STUFFED_TRESHOLD = PlayerConstants.BT_STOMACH_VOLUME_LVL3;
4  override void Init()
5  {
6  m_TrackActivatedTime = false;
7  m_ID = eModifiers.MDF_STUFFED;
10  }
11 
12  override void OnTick(PlayerBase player, float deltaT)
13  {
14 
15  }
16 
17  override bool ActivateCondition(PlayerBase player)
18  {
19  float stomach = player.m_PlayerStomach.GetStomachVolume();
20  if ( stomach >= STUFFED_TRESHOLD )
21  {
22  return true;
23  }
24  else
25  {
26  return false;
27  }
28  }
29 
30  override void OnActivate(PlayerBase player)
31  {
32  if( player.GetNotifiersManager() )
33  {
34  player.GetNotifiersManager().ActivateByType(eNotifiers.NTF_STUFFED);
35  }
36  }
37 
38  override void OnDeactivate(PlayerBase player)
39  {
40  if( player.GetNotifiersManager() )
41  {
42  player.GetNotifiersManager().DeactivateByType(eNotifiers.NTF_STUFFED);
43  }
44  }
45 
46  override bool DeactivateCondition(PlayerBase player)
47  {
48  return !ActivateCondition(player);
49  }
50 
51 };
m_TickIntervalActive
float m_TickIntervalActive
Definition: modifierbase.c:19
m_TrackActivatedTime
bool m_TrackActivatedTime
Definition: modifierbase.c:15
StuffedStomachMdfr
Definition: stuffedstomach.c:1
DEFAULT_TICK_TIME_ACTIVE
const int DEFAULT_TICK_TIME_ACTIVE
Definition: modifiersmanager.c:31
PlayerBase
Definition: playerbaseclient.c:1
PlayerConstants
Definition: playerconstants.c:1
m_TickIntervalInactive
float m_TickIntervalInactive
Definition: modifierbase.c:18
eModifiers
eModifiers
Definition: emodifiers.c:1
ModifierBase
Definition: breathvapourmdfr.c:3
eNotifiers
eNotifiers
Definition: notifiersmanager.c:1
m_ID
protected int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
Definition: effect.c:49