DayZ 1.24
Loading...
Searching...
No Matches
ActionRaiseFlag.c
Go to the documentation of this file.
8
10{
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
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 return true;
50
51 return false;
52 }
53
55 {
56 TerritoryFlag totem = TerritoryFlag.Cast(action_data.m_Target.GetObject());
57 if (totem)
58 {
59 totem.AnimateFlagEx(totem.GetAnimationPhase("flag_mast") - UAMisc.FLAG_STEP_INCREMENT, action_data.m_Player);
60 totem.AddRefresherTime01(UAMisc.FLAG_STEP_INCREMENT);
61 }
62 }
63};
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
ActionData m_ActionData
ref CABase m_ActionComponent
Definition ActionBase.c:30
override void CreateActionComponent()
override bool HasTarget()
override bool HasProgress()
override void CreateConditionComponents()
override void OnFinishProgressServer(ActionData action_data)
override GetInputType()
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597