Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actioninjecttarget.c
Go to the documentation of this file.
2 {
3  void ActionInjectTarget()
4  {
5  m_SpecialtyWeight = UASoftSkillsWeight.PRECISE_MEDIUM;
6 
7  m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_INJECTIONTARGET;
8  m_FullBody = true;
9  m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_CROUCH;
10  m_Text = "#inject_target";
11  }
12 
13  override void CreateConditionComponents()
14  {
17  }
18 
19  override void OnExecuteServer( ActionData action_data )
20  {
21  if (CanReceiveAction(action_data.m_Target))
22  {
23  if (action_data.m_MainItem)
24  {
25  ApplyModifiers(action_data);
26  action_data.m_Player.GetSoftSkillsManager().AddSpecialty( m_SpecialtyWeight );
27  }
28  }
29  }
30 
31  override void OnEndServer( ActionData action_data )
32  {
33  if (action_data.m_WasExecuted && action_data.m_MainItem )
34  {
35  action_data.m_MainItem.Delete();
36  }
37  }
38 
39  override void ApplyModifiers( ActionData action_data )
40  {
41  action_data.m_MainItem.OnApply( PlayerBase.Cast(action_data.m_Target.GetObject()));
42  //PlayerBase ntarget = PlayerBase.Cast( action_data.m_Target.GetObject() );
43  //ntarget.GiveShock(100);
44  }
45 };
CCTMan
Definition: cctman.c:1
UASoftSkillsWeight
Definition: actionconstants.c:118
UAMaxDistances
Definition: actionconstants.c:104
m_FullBody
protected bool m_FullBody
Definition: actionbase.c:52
PlayerBase
Definition: playerbaseclient.c:1
ActionData
Definition: actionbase.c:20
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition: dayzplayer.c:601
m_Text
protected string m_Text
Definition: actionbase.c:49
ActionSingleUseBase
Definition: actionsingleusebase.c:41
m_ConditionItem
ref CCIBase m_ConditionItem
Definition: actionbase.c:55
ActionInjectTarget
Definition: actioninjecttarget.c:1
CCINonRuined
Definition: ccinonruined.c:1
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition: actionbase.c:56
m_SpecialtyWeight
protected float m_SpecialtyWeight
Definition: actionbase.c:68
m_StanceMask
protected int m_StanceMask
Definition: actionbase.c:53
CanReceiveAction
bool CanReceiveAction(ActionTarget target)
Definition: actionbase.c:638