DayZ 1.24
Loading...
Searching...
No Matches
ActionDisinfectSelf.c
Go to the documentation of this file.
8
10{
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
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
52 {
53
54 if (action_data.m_Player.GetModifiersManager().IsModifierActive(eModifiers.MDF_DISINFECTION))//effectively resets the timer
55 action_data.m_Player.GetModifiersManager().DeactivateModifier(eModifiers.MDF_DISINFECTION);
56 action_data.m_Player.GetModifiersManager().ActivateModifier(eModifiers.MDF_DISINFECTION);
57
59 }
60
61
62};
bool m_FullBody
Definition ActionBase.c:52
string m_Text
Definition ActionBase.c:49
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
float m_SpecialtyWeight
Definition ActionBase.c:68
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
int m_StanceMask
Definition ActionBase.c:53
void ActionDisinfectSelf()
override void CreateConditionComponents()
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override bool HasTarget()
ActionDisinfectBase m_GramsConsumedPerUse
eModifierSyncIDs
ActionData m_ActionData
void OnFinishProgressServer(ActionData action_data)
ref CABase m_ActionComponent
Definition ActionBase.c:30
void Apply(ActionData action_data)
override void CreateActionComponent()
const float DEFAULT
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597
eModifiers
Definition eModifiers.c:2