DayZ 1.24
Loading...
Searching...
No Matches
ActionDisinfectTarget.c
Go to the documentation of this file.
9
11{
13 {
16 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_INTERACT;
17 m_FullBody = true;
18 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_CROUCH;
19 m_Text = "#disinfect_target";
20 }
21
27
28 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
29 {
30 if (target)
31 {
32 PlayerBase target_player = PlayerBase.Cast(target.GetObject());
33 if (target_player)
34 return (target_player.IsBleeding() || (player.m_SyncedModifiers & eModifierSyncIDs.MODIFIER_SYNC_WOUND_INFECT_1) || (player.m_SyncedModifiers & eModifierSyncIDs.MODIFIER_SYNC_WOUND_INFECT_2));
35
36 }
37 return false;
38 }
39
41 {
42 PlayerBase target = PlayerBase.Cast(action_data.m_Target.GetObject());
43
44 if (target)
45 {
46 if (CanReceiveAction(action_data.m_Target))
47 {
48 target.GetModifiersManager().ActivateModifier(eModifiers.MDF_DISINFECTION);
50 }
51 }
52 }
53};
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
bool CanReceiveAction(ActionTarget target)
Definition ActionBase.c:594
int m_StanceMask
Definition ActionBase.c:53
eModifierSyncIDs
ActionData m_ActionData
ref CABase m_ActionComponent
Definition ActionBase.c:30
void Apply(ActionData action_data)
override void CreateActionComponent()
override void CreateConditionComponents()
override void OnFinishProgressServer(ActionData action_data)
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition CCTMan.c:2
const float DEFAULT
const float DEFAULT
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597
eModifiers
Definition eModifiers.c:2