44 if (player.GetBrokenLegs() ==
eBrokenLegs.BROKEN_LEGS)
47 Object targetObject = target.GetObject();
48 Object targetParent = target.GetParent();
63 string damageZone =
"";
65 targetObject.GetActionComponentNameList(target.GetComponentIndex(), selections,
LOD.
NAME_VIEW);
67 foreach (
string selection : selections)
70 if (carEntity && DamageSystem.GetDamageZoneFromComponentName(carEntity, selection, damageZone))
72 if (damageZone ==
"Engine")
74 int zoneHP = car.GetHealthLevel(damageZone);
94 string damageZone = RepairCarPartActionData.Cast(action_data).m_DamageZone;
98 if (tgObject && damageZone !=
"")
104 float zoneMax = car.GetMaxHealth(damageZone,
"");
132 RepairCarPartActionData actionData =
new RepairCarPartActionData();
138 super.WriteToContext(ctx, action_data);
139 RepairCarPartActionData repairActionData;
144 ctx.
Write(repairActionData.m_DamageZone);
150 if (!action_recive_data)
153 super.ReadFromContext(ctx, action_recive_data);
170 super.HandleReciveData(action_recive_data, action_data);
173 RepairCarPartActionData.Cast(action_data).m_DamageZone = reciveDataRepair.
m_DamageZoneRecived;
ActionData CreateActionData()
void CreateConditionComponents()
protected float m_SpecialtyWeight
protected bool m_LockTargetOnUse
ref CCIBase m_ConditionItem
ref CCTBase m_ConditionTarget
void HandleReciveData(ActionReciveData action_recive_data, ActionData action_data)
protected bool m_FullBody
protected int m_StanceMask
RepairCarChassisActionReciveData m_DamageZone
int m_LastValidComponentIndex
ActionRepairCarEngineCB m_LastValidType
string m_CurrentDamageZone
void ActionRepairCarEngine()
class ActionTargets ActionTarget
void ReadFromContext(ParamsReadContext ctx)
void WriteToContext(ParamsWriteContext ctx)
protected ActionData m_ActionData
protected void OnFinishProgressServer(ActionData action_data)
ref CABase m_ActionComponent
ref ActionTarget m_Target
override void CreateActionComponent()
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Super root of all classes in Enforce script.
static const string NAME_VIEW
string m_DamageZoneRecived
string m_DamageZoneRecived
Serialization general interface. Serializer API works with:
proto bool Write(void value_out)
proto bool Read(void value_in)
const float BASEBUILDING_REPAIR_FAST
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
DayZPlayerConstants
defined in C++
proto native CGame GetGame()
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
const float DAMAGE_RUINED_VALUE
const float DAMAGE_DAMAGED_VALUE
const float DAMAGE_BADLY_DAMAGED_VALUE
const int STATE_BADLY_DAMAGED
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
static float RandomFloatInclusive(float min, float max)
Returns a random float number between and min [inclusive] and max [inclusive].