Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
cacontinuousrepeatfishing.c
Go to the documentation of this file.
2 {
3  void CAContinuousRepeatFishing( float time_to_complete_action )
4  {
5  m_DefaultTimeToComplete = time_to_complete_action;
6  }
7 
8  override int Execute( ActionData action_data )
9  {
10  //Print("CAContinuousRepeatFishing | Execute");
11  if ( !action_data.m_Player )
12  {
13  //Print("CAContinuousRepeatFishing | UA_ERROR");
14  return UA_ERROR;
15  }
16 
17  if ( m_TimeElpased < m_TimeToComplete )
18  {
19  m_TimeElpased += action_data.m_Player.GetDeltaT();
20  m_TotalTimeElpased += action_data.m_Player.GetDeltaT();
21  //Print("CAContinuousRepeatFishing | Execute | m_TimeElpased: " + m_TimeElpased);
22  return UA_PROCESSING;
23  }
24  else
25  {
26  m_SpentUnits.param1 = m_TimeElpased;
27  SetACData(m_SpentUnits);
28  m_TimeElpased = m_TimeToComplete - m_TimeElpased;
29  OnCompletePogress(action_data);
30 
31  FishingActionData fad = FishingActionData.Cast(action_data);
32  if (fad && fad.m_FishingResult != -1)
33  {
34  //Print("CAContinuousRepeatFishing | UA_FINISHED");
35  return UA_FINISHED;
36  }
37  else
38  {
39  //Print("CAContinuousRepeatFishing | UA_PROCESSING");
40  return UA_PROCESSING;
41  }
42  }
43  }
44 };
UA_ERROR
const int UA_ERROR
Definition: constants.c:455
CAContinuousRepeat
Definition: cacontinuousrepeat.c:1
CAContinuousRepeatFishing
Definition: cacontinuousrepeatfishing.c:1
UA_FINISHED
const int UA_FINISHED
Definition: constants.c:436
FishingActionData
Definition: actionfishingnew.c:1
ActionData
Definition: actionbase.c:20
UA_PROCESSING
const int UA_PROCESSING
Definition: constants.c:434