DayZ Scripts
v1.21.156300 ยท Jun 20, 2023
 
Loading...
Searching...
No Matches
ActionBandageSelf.c
Go to the documentation of this file.
2{
3 override void CreateActionComponent()
4 {
6 float adjusted_time_spent;
7 if (effectivity > 0)
8 adjusted_time_spent = UATimeSpent.BANDAGE / effectivity;
9 m_ActionData.m_ActionComponent = new CAContinuousTime(adjusted_time_spent);
10 }
11};
12
14{
16 {
18 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_BANDAGE;
19 m_FullBody = true;
20 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH;
22 m_Text = "#treat_wound";
23 }
24
26 {
29 }
30
31 override bool HasTarget()
32 {
33 return false;
34 }
35/*
36 override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
37 {
38 return player.IsBleeding();
39 }*/
40
41 override void OnFinishProgressServer( ActionData action_data )
42 {
43 PlayerBase target = PlayerBase.Cast(action_data.m_Player);
44 if(action_data.m_MainItem && target)
45 {
46 ApplyBandage( action_data.m_MainItem, target );
47 action_data.m_Player.GetSoftSkillsManager().AddSpecialty( m_SpecialtyWeight );
48 }
49 }
50};
protected float m_SpecialtyWeight
Definition ActionBase.c:68
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
protected string m_Text
Definition ActionBase.c:49
protected bool m_FullBody
Definition ActionBase.c:52
protected int m_StanceMask
Definition ActionBase.c:53
void ApplyBandage(ItemBase item, PlayerBase player)
override void CreateActionComponent()
override void OnFinishProgressServer(ActionData action_data)
override void CreateConditionComponents()
override bool HasTarget()
protected ActionData m_ActionData
ItemBase m_MainItem
Definition ActionBase.c:28
PlayerBase m_Player
Definition ActionBase.c:33
ref CABase m_ActionComponent
Definition ActionBase.c:30
override float GetBandagingEffectivity()
const float BANDAGE
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602