DayZ 1.24
Loading...
Searching...
No Matches
ActionBandageTarget.c
Go to the documentation of this file.
2{
13}
14
16{
18 {
19 m_CallbackClass = ActionBandageTargetCB;
20 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_BANDAGETARGET;
21 m_FullBody = true;
22 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_CROUCH;
23
24 m_Text = "#treat_persons_wound";
25 }
26
28 {
31 }
32
34 {
35 if (player.IsPlayerInStance(DayZPlayerConstants.STANCEMASK_CROUCH | DayZPlayerConstants.STANCEMASK_PRONE))
36 return DayZPlayerConstants.STANCEMASK_CROUCH;
37 else
38 return DayZPlayerConstants.STANCEMASK_ERECT;
39 }
40
41 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
42 {
43 PlayerBase otherPlayer = PlayerBase.Cast(target.GetObject());
44 if (otherPlayer)
45 return otherPlayer.IsBleeding();
46
47 return false;
48 }
49
51 {
52 PlayerBase target = PlayerBase.Cast(action_data.m_Target.GetObject());
53
54 if (action_data.m_MainItem && target)
55 {
56 if (CanReceiveAction(action_data.m_Target))
57 ApplyBandage(action_data.m_MainItem, target);
58 }
59 }
60
62 {
63 GetGame().GetAnalyticsClient().OnActionBandageTarget();
64 }
65}
ActionBandageTargetCB ActionContinuousBaseCB ActionBandageTarget()
bool m_FullBody
Definition ActionBase.c:52
string m_Text
Definition ActionBase.c:49
void CreateConditionComponents()
Definition ActionBase.c:196
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
bool CanReceiveAction(ActionTarget target)
Definition ActionBase.c:594
int m_StanceMask
Definition ActionBase.c:53
int GetStanceMask()
void ApplyBandage(ItemBase item, PlayerBase player)
override void CreateActionComponent()
ActionData m_ActionData
void OnFinishProgressClient(ActionData action_data)
void OnFinishProgressServer(ActionData action_data)
ref CABase m_ActionComponent
Definition ActionBase.c:30
ItemBase m_MainItem
Definition ActionBase.c:28
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition CCTMan.c:2
override float GetBandagingEffectivity()
const float DEFAULT
const float BANDAGE
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597
proto native CGame GetGame()