Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actioncollectbloodself.c
Go to the documentation of this file.
2 {
3  override void CreateActionComponent()
4  {
5  m_ActionData.m_ActionComponent = new CAContinuousTime(UATimeSpent.COLLECT_BLOOD);
6  }
7 };
8 
10 {
12  {
13  m_CallbackClass = ActionCollectBloodSelfCB;
14  m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_COLLECTBLOODSELF;
15  m_FullBody = true;
16  m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_CROUCH;
18  m_Text = "#collect_blood";
19  }
20 
21  override void CreateConditionComponents()
22  {
25  }
26 
27  override bool HasTarget()
28  {
29  return false;
30  }
31 
32  override void OnEndServer( ActionData action_data )
33  {
34  Param1<float> nacdata;
35  Class.CastTo(nacdata, action_data.m_ActionComponent.GetACData() );
36  float delta = 0;
37  if(nacdata)
38  delta = (nacdata.param1 / UATimeSpent.COLLECT_BLOOD);
39 
40  if(delta > 0)
41  {
42  ActionCollectBloodTargetLambda lambda = new ActionCollectBloodTargetLambda(action_data.m_MainItem, "BloodBagFull", action_data.m_Player, m_SpecialtyWeight, action_data.m_Player, delta);
43  action_data.m_Player.ServerReplaceItemInHandsWithNew(lambda);
44  }
45  }
46 };
47 
ActionCollectBloodSelf
Definition: actioncollectbloodself.c:9
CAContinuousTime
Definition: cacontinuoustime.c:1
UASoftSkillsWeight
Definition: actionconstants.c:118
ActionCollectBloodSelfCB
Definition: actioncollectbloodself.c:1
m_FullBody
protected bool m_FullBody
Definition: actionbase.c:52
ActionData
Definition: actionbase.c:20
ActionCollectBloodTargetLambda
Definition: actioncollectbloodtarget.c:49
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition: dayzplayer.c:601
CCTSelf
Definition: cctself.c:1
UATimeSpent
Definition: actionconstants.c:26
ActionContinuousBaseCB
Definition: actioncontinuousbase.c:1
m_Text
protected string m_Text
Definition: actionbase.c:49
m_ConditionItem
ref CCIBase m_ConditionItem
Definition: actionbase.c:55
ActionContinuousBase
Definition: actioncontinuousbase.c:132
CCINonRuined
Definition: ccinonruined.c:1
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition: actionbase.c:56
Class
Super root of all classes in Enforce script.
Definition: enscript.c:10
m_SpecialtyWeight
protected float m_SpecialtyWeight
Definition: actionbase.c:68
m_StanceMask
protected int m_StanceMask
Definition: actionbase.c:53