DayZ 1.24
Loading...
Searching...
No Matches
ActionLowerFlag.c
Go to the documentation of this file.
1
3{
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
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 return false;
39
40 float state = totem.GetAnimationPhase("flag_mast");
41 if (totem.FindAttachmentBySlotName("Material_FPole_Flag") && state < 1)
42 return true;
43 return false;
44 }
45
47 {
48 TerritoryFlag totem = TerritoryFlag.Cast(action_data.m_Target.GetObject());
49 if (totem)
50 {
51 totem.AnimateFlagEx(totem.GetAnimationPhase("flag_mast") + UAMisc.FLAG_STEP_INCREMENT, action_data.m_Player);
52 totem.AddRefresherTime01(-UAMisc.FLAG_STEP_INCREMENT);
53 }
54 }
55};
bool m_FullBody
Definition ActionBase.c:52
string m_Text
Definition ActionBase.c:49
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
int m_StanceMask
Definition ActionBase.c:53
override bool HasProgress()
override GetInputType()
override void CreateConditionComponents()
override void OnFinishProgressServer(ActionData action_data)
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override bool HasTarget()
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597