Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actionraiseflag.c
Go to the documentation of this file.
2 {
3  override void CreateActionComponent()
4  {
5  m_ActionData.m_ActionComponent = new CAContinuousRepeat(1);
6  }
7 };
8 
10 {
11  void ActionRaiseFlag()
12  {
13  m_CallbackClass = ActionManipulateFlagCB;
14  m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_RAISE_FLAG;
15  m_FullBody = true;
16  m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT;
17  m_Text = "#raise_flag";
18  }
19 
20  override void CreateConditionComponents()
21  {
24  }
25 
26  override typename GetInputType()
27  {
29  }
30 
31  override bool HasTarget()
32  {
33  return true;
34  }
35 
36  override bool HasProgress()
37  {
38  return true;
39  }
40 
41  override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
42  {
43  TerritoryFlag totem = TerritoryFlag.Cast( target.GetObject() );
44  if (!totem)
45  return false;
46 
47  float state = totem.GetAnimationPhase("flag_mast");
48  if ( totem.FindAttachmentBySlotName("Material_FPole_Flag") && state > 0 )
49  {
50  return true;
51  }
52 
53  return false;
54  }
55 
56  override void OnFinishProgressServer( ActionData action_data )
57  {
58  TerritoryFlag totem = TerritoryFlag.Cast( action_data.m_Target.GetObject() );
59  if ( totem )
60  {
61  totem.AnimateFlagEx(totem.GetAnimationPhase("flag_mast") - UAMisc.FLAG_STEP_INCREMENT, action_data.m_Player);
62  totem.AddRefresherTime01(UAMisc.FLAG_STEP_INCREMENT);
63  }
64  }
65 };
ItemBase
Definition: inventoryitem.c:730
CAContinuousRepeat
Definition: cacontinuousrepeat.c:1
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
ActionRaiseFlag
Definition: actionraiseflag.c:9
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition: dayzplayer.c:601
ActionManipulateFlagCB
Definition: actionraiseflag.c:1
CCTCursor
Definition: cctcursor.c:1
ActionContinuousBaseCB
Definition: actioncontinuousbase.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