Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
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 {
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};
ActionData m_ActionData
int m_StanceMask
Definition actionbase.c:62
string m_Text
Definition actionbase.c:58
ref CCIBase m_ConditionItem
Definition actionbase.c:64
bool m_FullBody
Definition actionbase.c:61
ref CCTBase m_ConditionTarget
Definition actionbase.c:65
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602