Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
actionlowerflag.c
Go to the documentation of this file.
1
3{
4 void ActionLowerFlag()
5 {
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};
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