Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actiondisinfectself.c
Go to the documentation of this file.
2 {
3  override void CreateActionComponent()
4  {
5  m_ActionData.m_ActionComponent = new CAContinuousTime(UATimeSpent.DEFAULT);
6  }
7 };
8 
10 {
11  void Apply( ActionData action_data )
12  {
13  ItemBase item = action_data.m_MainItem;
14  item.AddQuantity(-item.GetDisinfectQuantity());
15 
16  }
17 }
18 
19 
21 {
22  float m_GramsConsumedPerUse;//left for legacy reasons
23 
25  {
26  m_CallbackClass = ActionDisinfectSelfCB;
28  m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_STITCHUPSELF;
29  m_FullBody = true;
30  m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_CROUCH;
31  m_Text = "#disinfect_self";
32  }
33 
34  override void CreateConditionComponents()
35  {
38  }
39 
40  override bool HasTarget()
41  {
42  return false;
43  }
44 
45  override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
46  {
47  return (player.IsBleeding() || (player.m_SyncedModifiers & eModifierSyncIDs.MODIFIER_SYNC_WOUND_INFECT_1) || (player.m_SyncedModifiers & eModifierSyncIDs.MODIFIER_SYNC_WOUND_INFECT_2));
48  }
49 
50 
51  override void OnFinishProgressServer( ActionData action_data )
52  {
53 
54  if( action_data.m_Player.GetModifiersManager().IsModifierActive(eModifiers.MDF_DISINFECTION))//effectively resets the timer
55  {
56  action_data.m_Player.GetModifiersManager().DeactivateModifier( eModifiers.MDF_DISINFECTION );
57  }
58  action_data.m_Player.GetModifiersManager().ActivateModifier( eModifiers.MDF_DISINFECTION );
59 
60  Apply(action_data);
61  }
62 
63 
64 };
ItemBase
Definition: inventoryitem.c:730
ActionDisinfectSelfCB
Definition: actiondisinfectself.c:1
CAContinuousTime
Definition: cacontinuoustime.c:1
m_GramsConsumedPerUse
ActionDisinfectBase m_GramsConsumedPerUse
UASoftSkillsWeight
Definition: actionconstants.c:118
ActionDisinfectBase
Definition: actiondisinfectself.c:9
CreateConditionComponents
override void CreateConditionComponents()
Definition: actiondisinfectself.c:34
ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition: actiondisinfectself.c:45
m_FullBody
protected bool m_FullBody
Definition: actionbase.c:52
PlayerBase
Definition: playerbaseclient.c:1
ActionTarget
class ActionTargets ActionTarget
ActionData
Definition: actionbase.c:20
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition: dayzplayer.c:601
CCTSelf
Definition: cctself.c:1
eModifiers
eModifiers
Definition: emodifiers.c:1
OnFinishProgressServer
override void OnFinishProgressServer(ActionData action_data)
Definition: actiondisinfectself.c:51
UATimeSpent
Definition: actionconstants.c:26
ActionContinuousBaseCB
Definition: actioncontinuousbase.c:1
ActionDisinfectSelf
void ActionDisinfectSelf()
Definition: actiondisinfectself.c:24
eModifierSyncIDs
eModifierSyncIDs
Definition: modifiersmanager.c:2
HasTarget
override bool HasTarget()
Definition: actiondisinfectself.c:40
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
m_SpecialtyWeight
protected float m_SpecialtyWeight
Definition: actionbase.c:68
m_StanceMask
protected int m_StanceMask
Definition: actionbase.c:53