DayZ 1.24
Loading...
Searching...
No Matches
ActionBandageTarget.c File Reference

Go to the source code of this file.

Classes

class  ActionBandageTargetCB
 

Functions

ActionBandageTargetCB ActionContinuousBaseCB ActionBandageTarget ()
 
override void CreateActionComponent ()
 
override void CreateConditionComponents ()
 
override int GetStanceMask (PlayerBase player)
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnFinishProgressServer (ActionData action_data)
 
override void OnFinishProgressClient (ActionData action_data)
 

Function Documentation

◆ ActionBandageTarget()

Definition at line 1 of file ActionBandageTarget.c.

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 }
bool m_FullBody
Definition ActionBase.c:52
string m_Text
Definition ActionBase.c:49
int m_StanceMask
Definition ActionBase.c:53
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597

Referenced by ActionConstructor::RegisterActions(), ItemBase::SetActions(), and Bandana_ColorBase::SetActions().

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )

Definition at line 41 of file ActionBandageTarget.c.

42 {
43 PlayerBase otherPlayer = PlayerBase.Cast(target.GetObject());
44 if (otherPlayer)
45 return otherPlayer.IsBleeding();
46
47 return false;
48 }

◆ CreateActionComponent()

override void ActionBandageTarget::CreateActionComponent ( )

Definition at line 18 of file ActionBandageTarget.c.

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
27 override void CreateConditionComponents()
override void CreateConditionComponents()

References m_FullBody, m_StanceMask, and m_Text.

◆ CreateConditionComponents()

override void CreateConditionComponents ( )

Definition at line 27 of file ActionBandageTarget.c.

28 {
31 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
Definition CCTMan.c:2
const float DEFAULT

References UAMaxDistances::DEFAULT, m_ConditionItem, and m_ConditionTarget.

◆ GetStanceMask()

override int GetStanceMask ( PlayerBase player)

Definition at line 33 of file ActionBandageTarget.c.

34 {
35 if (player.IsPlayerInStance(DayZPlayerConstants.STANCEMASK_CROUCH | DayZPlayerConstants.STANCEMASK_PRONE))
36 return DayZPlayerConstants.STANCEMASK_CROUCH;
37 else
38 return DayZPlayerConstants.STANCEMASK_ERECT;
39 }

◆ OnFinishProgressClient()

override void OnFinishProgressClient ( ActionData action_data)

Definition at line 61 of file ActionBandageTarget.c.

62 {
63 GetGame().GetAnalyticsClient().OnActionBandageTarget();
64 }
proto native CGame GetGame()

References GetGame().

◆ OnFinishProgressServer()

override void OnFinishProgressServer ( ActionData action_data)

Definition at line 50 of file ActionBandageTarget.c.

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 }
bool CanReceiveAction(ActionTarget target)
Definition ActionBase.c:594
override void ApplyBandage(ItemBase item, PlayerBase player)

References ActionBandageBase::ApplyBandage(), and CanReceiveAction().