Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actiontestbloodtarget.c
Go to the documentation of this file.
2 {
3  override void CreateActionComponent()
4  {
5  m_ActionData.m_ActionComponent = new CAContinuousTime(UATimeSpent.TEST_BLOOD);
6  }
7 };
8 
10 {
12  {
13  m_CallbackClass = ActionTestBloodTargetCB;
14  m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_BANDAGETARGET;
15  m_FullBody = true;
17  m_Text = "#test_targets_blood";
18  }
19 
20  override void CreateConditionComponents()
21  {
24  }
25 
26  override void OnFinishProgressClient( ActionData action_data )
27  {
28  PlayerBase ntarget = PlayerBase.Cast( action_data.m_Target.GetObject() );
29 
30  if( ntarget )
31  {
32  string blood_type_name, blood_name;
33  bool positive;
34  blood_type_name = BloodTypes.GetBloodTypeName( ntarget.GetBloodType(), blood_name, positive );
35 
36  ntarget.SetLastUAMessage(blood_type_name);
37  }
38  }
39 
40  override void OnStartServer( ActionData action_data )
41  {
42  PlayerBase ntarget = PlayerBase.Cast( action_data.m_Target.GetObject() );
43  PluginLifespan module_lifespan = PluginLifespan.Cast( GetPlugin( PluginLifespan ) );
44  int blood_type = ntarget.GetStatBloodType().Get();
45 
46  module_lifespan.UpdateBloodType( ntarget, blood_type );
47  }
48 
49  override void OnFinishProgressServer( ActionData action_data )
50  {
51  PlayerBase ntarget = PlayerBase.Cast( action_data.m_Target.GetObject() );
52  PluginLifespan module_lifespan = PluginLifespan.Cast( GetPlugin( PluginLifespan ) );
53 
54  module_lifespan.UpdateBloodTypeVisibility( ntarget, true );
55 
56  action_data.m_MainItem.Delete();
57  action_data.m_Player.GetSoftSkillsManager().AddSpecialty( m_SpecialtyWeight );
58  }
59 };
CAContinuousTime
Definition: cacontinuoustime.c:1
CCTMan
Definition: cctman.c:1
UASoftSkillsWeight
Definition: actionconstants.c:118
ActionTestBloodTargetCB
Definition: actiontestbloodtarget.c:1
UAMaxDistances
Definition: actionconstants.c:104
GetPlugin
PluginBase GetPlugin(typename plugin_type)
Definition: pluginmanager.c:316
m_FullBody
protected bool m_FullBody
Definition: actionbase.c:52
PlayerBase
Definition: playerbaseclient.c:1
ActionData
Definition: actionbase.c:20
PluginLifespan
void PluginLifespan()
Definition: pluginlifespan.c:45
BloodTypes
Definition: bloodtype.c:1
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition: dayzplayer.c:601
UATimeSpent
Definition: actionconstants.c:26
ActionContinuousBaseCB
Definition: actioncontinuousbase.c:1
m_Text
protected string m_Text
Definition: actionbase.c:49
ActionTestBloodTarget
Definition: actiontestbloodtarget.c:9
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
m_SpecialtyWeight
protected float m_SpecialtyWeight
Definition: actionbase.c:68