Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
statecb.c
Go to the documentation of this file.
1 class SymptomCB extends HumanCommandActionCallback
2 {
3  //int m_SymptomUID;
4  float m_RunTime;
5  float m_StartingTime;
7 
8  override void OnFinish(bool pCanceled)
9  {
10  if( m_Player && m_Player.GetSymptomManager())
11  {
12  m_Player.GetSymptomManager().OnAnimationFinished();
13  }
14  }
15 
16 
17  void Init(float run_time, PlayerBase player)
18  {
20  m_RunTime = run_time * 1000;
21  m_StartingTime = GetGame().GetTime();
22  m_Player = player;
23 
24  if( m_Player && m_Player.GetSymptomManager())
25  {
26  m_Player.GetSymptomManager().OnAnimationStarted();
27  }
28  }
29 
30  bool CancelCondition()
31  {
32  if(m_RunTime > 0 && (GetGame().GetTime() > m_StartingTime + m_RunTime))
33  {
34  return true;
35  }
36  else
37  {
38  return false;
39  }
40  }
41 
42  override bool IsSymptomCallback()
43  {
44  return true;
45  }
46 
47 };
GetGame
proto native CGame GetGame()
m_RunTime
protected float m_RunTime
Definition: tools.c:226
CancelCondition
bool CancelCondition()
Definition: actionunfoldmap.c:46
EnableCancelCondition
proto native void EnableCancelCondition(bool pEnable)
IsSymptomCallback
bool IsSymptomCallback()
Definition: human.c:423
PlayerBase
Definition: playerbaseclient.c:1
Init
class InventoryGridController extends ScriptedWidgetEventHandler Init
Definition: uihintpanel.c:46
m_Player
DayZPlayer m_Player
Definition: hand_events.c:42
HumanCommandActionCallback
Definition: statecb.c:1
OnFinish
void OnFinish(bool pCanceled)
called ALWAYS! when action is finished (normal finish or cancel -> pCanceled)
Definition: human.c:406
GetTime
float GetTime()
Definition: notificationsystem.c:35