Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actionlowerflag.c
Go to the documentation of this file.
1 
3 {
4  void ActionLowerFlag()
5  {
6  m_CallbackClass = ActionManipulateFlagCB;
7  m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_LOWER_FLAG;
8  m_FullBody = true;
9  m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT;
10  m_Text = "#lower_flag";
11  }
12 
13  override void CreateConditionComponents()
14  {
17  }
18 
19  override typename GetInputType()
20  {
22  }
23 
24  override bool HasTarget()
25  {
26  return true;
27  }
28 
29  override bool HasProgress()
30  {
31  return true;
32  }
33 
34  override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
35  {
36  TerritoryFlag totem = TerritoryFlag.Cast( target.GetObject() );
37  if (!totem)
38  {
39  return false;
40  }
41 
42  float state = totem.GetAnimationPhase("flag_mast");
43  if ( totem.FindAttachmentBySlotName("Material_FPole_Flag") && state < 1 )
44  {
45  return true;
46  }
47  return false;
48  }
49 
50  override void OnFinishProgressServer( ActionData action_data )
51  {
52  TerritoryFlag totem = TerritoryFlag.Cast( action_data.m_Target.GetObject() );
53  if ( totem )
54  {
55  totem.AnimateFlagEx(totem.GetAnimationPhase("flag_mast") + UAMisc.FLAG_STEP_INCREMENT, action_data.m_Player);
56  totem.AddRefresherTime01(-UAMisc.FLAG_STEP_INCREMENT);
57  }
58  }
59 };
ItemBase
Definition: inventoryitem.c:730
ContinuousInteractActionInput
Definition: actioninput.c:521
CCINone
Definition: ccinone.c:1
m_FullBody
protected bool m_FullBody
Definition: actionbase.c:52
PlayerBase
Definition: playerbaseclient.c:1
ActionTarget
class ActionTargets ActionTarget
ActionData
Definition: actionbase.c:20
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition: dayzplayer.c:601
ActionManipulateFlagCB
Definition: actionraiseflag.c:1
CCTCursor
Definition: cctcursor.c:1
m_Text
protected string m_Text
Definition: actionbase.c:49
m_ConditionItem
ref CCIBase m_ConditionItem
Definition: actionbase.c:55
ActionContinuousBase
Definition: actioncontinuousbase.c:132
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition: actionbase.c:56
m_StanceMask
protected int m_StanceMask
Definition: actionbase.c:53
ActionLowerFlag
Definition: actionlowerflag.c:2