Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actioninjectself.c
Go to the documentation of this file.
2 {
3  void ActionInjectSelf()
4  {
5  m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_INJECTION;
6  m_FullBody = true;
7  m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH;
8  m_SpecialtyWeight = UASoftSkillsWeight.PRECISE_MEDIUM;
9  m_Text = "#inject";
10  }
11 
12  override void CreateConditionComponents()
13  {
16  }
17 
18  override bool HasTarget()
19  {
20  return false;
21  }
22 
23  override void OnExecuteServer( ActionData action_data )
24  {
25  if (action_data.m_MainItem)
26  {
27  ApplyModifiers(action_data);
28  action_data.m_Player.GetSoftSkillsManager().AddSpecialty( m_SpecialtyWeight );
29  }
30  }
31 
32  override void OnEndServer( ActionData action_data )
33  {
34  if (action_data.m_WasExecuted && action_data.m_MainItem )
35  {
36  action_data.m_MainItem.Delete();
37  }
38  }
39 
40  override void OnEndClient( ActionData action_data )
41  {
42  if (action_data.m_WasExecuted && action_data.m_MainItem )
43  {
44  action_data.m_MainItem.DeleteOnClient();
45  }
46  }
47 
48  override void ApplyModifiers( ActionData action_data )
49  {
50  action_data.m_MainItem.OnApply(action_data.m_Player);
51  //action_data.m_Player.m_ModifiersManager.DeactivateModifier(eModifiers.MDF_HEART_ATTACK);
52 
53  }
54 };
UASoftSkillsWeight
Definition: actionconstants.c:118
m_FullBody
protected bool m_FullBody
Definition: actionbase.c:52
ActionData
Definition: actionbase.c:20
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition: dayzplayer.c:601
CCTSelf
Definition: cctself.c:1
ActionInjectSelf
Definition: actioninjectself.c:1
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
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