DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс ActionRepairVehiclePartBase
+ Граф наследования:ActionRepairVehiclePartBase:

Защищенные члены

override void CreateConditionComponents ()
 
override void OnFinishProgressServer (ActionData action_data)
 
void AdjustVehicleHealthServer (ActionData action_data)
 
void AdjustItemQuantityServer (ActionData action_data)
 
override ActionData CreateActionData ()
 
override void WriteToContext (ParamsWriteContext ctx, ActionData action_data)
 
override bool ReadFromContext (ParamsReadContext ctx, out ActionReciveData action_recive_data)
 
override void HandleReciveData (ActionReciveData action_recive_data, ActionData action_data)
 

Защищенные данные

string m_CurrentDamageZone
 

Дополнительные унаследованные члены

- Закрытые члены унаследованные от ActionContinuousBase
void OnStartAnimationLoopServer (ActionData action_data)
 
void OnStartAnimationLoopClient (ActionData action_data)
 
void OnEndAnimationLoopServer (ActionData action_data)
 
void OnEndAnimationLoopClient (ActionData action_data)
 
void OnFinishProgressServer (ActionData action_data)
 
void OnFinishProgressClient (ActionData action_data)
 

Подробное описание

Методы

◆ AdjustItemQuantityServer()

void AdjustItemQuantityServer ( ActionData action_data)
inlineprotected
69 {
70 if (action_data.m_MainItem.HasQuantity())
71 {
72 if (action_data.m_MainItem.GetQuantity() > 1)
73 {
74 int qnt = action_data.m_MainItem.GetQuantity() - action_data.m_MainItem.GetQuantityMax() * 0.25;
75 action_data.m_MainItem.SetQuantity(qnt);
76 }
77 else
78 {
79 action_data.m_MainItem.Delete();
80 }
81 }
82 }
Definition EntityAI.c:95

Используется в OnFinishProgressServer().

◆ AdjustVehicleHealthServer()

void AdjustVehicleHealthServer ( ActionData action_data)
inlineprotected
36 {
37 Object tgObject = action_data.m_Target.GetObject();
38
39 string damageZone = RepairVehiclePartActionData.Cast(action_data).m_DamageZone;
40 if (!GetGame().IsMultiplayer())
42
43 if (tgObject && damageZone != "")
44 {
46 if (vehicle)
47 {
49 float zoneMax = vehicle.GetMaxHealth(damageZone, "");
50 float randomValue = Math.RandomFloatInclusive(zoneMax * 0.05, zoneMax * 0.15);
51
52 switch (newDmgLevel)
53 {
56 break;
59 break;
62 break;
63 }
64 }
65 }
66 }
string m_CurrentDamageZone
Definition ActionRepairVehiclePartBase.c:21
Definition constants.c:638
Definition EnMath.c:7
Definition ObjectTyped.c:2
Base native class for all motorized wheeled vehicles.
Definition Boat.c:28
proto native CGame GetGame()
const float DAMAGE_RUINED_VALUE
Definition constants.c:823
const float DAMAGE_DAMAGED_VALUE
Definition constants.c:821
const float DAMAGE_BADLY_DAMAGED_VALUE
Definition constants.c:822
const int STATE_RUINED
Definition constants.c:807
const int STATE_BADLY_DAMAGED
Definition constants.c:808
const int STATE_DAMAGED
Definition constants.c:809
const int STATE_WORN
Definition constants.c:810
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].
Definition EnMath.c:106

Перекрестные ссылки Math::Clamp(), GameConstants::DAMAGE_BADLY_DAMAGED_VALUE, GameConstants::DAMAGE_DAMAGED_VALUE, GameConstants::DAMAGE_RUINED_VALUE, GetGame(), m_CurrentDamageZone, Math::RandomFloatInclusive(), GameConstants::STATE_BADLY_DAMAGED, GameConstants::STATE_DAMAGED, GameConstants::STATE_RUINED и GameConstants::STATE_WORN.

Используется в OnFinishProgressServer().

◆ CreateActionData()

override ActionData CreateActionData ( )
inlineprotected

◆ CreateConditionComponents()

override void CreateConditionComponents ( )
inlineprotected
24 {
27 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:64
ref CCTBase m_ConditionTarget
Definition ActionBase.c:65
Definition CCINonRuined.c:2
Definition CCTCursor.c:2
Definition ActionConstants.c:106
const float REPAIR
Definition ActionConstants.c:109

Перекрестные ссылки ActionBase::m_ConditionItem, ActionBase::m_ConditionTarget и UAMaxDistances::REPAIR.

◆ HandleReciveData()

override void HandleReciveData ( ActionReciveData action_recive_data,
ActionData action_data )
inlineprotected
127 {
128 super.HandleReciveData(action_recive_data, action_data);
129
131 RepairVehiclePartActionData.Cast(action_data).m_DamageZone = recieveDataRepair.m_DamageZoneRecived;
132 }
Definition ActionRepairVehiclePartBase.c:2

◆ OnFinishProgressServer()

override void OnFinishProgressServer ( ActionData action_data)
inlineprotected
30 {
33 }
void AdjustItemQuantityServer(ActionData action_data)
Definition ActionRepairVehiclePartBase.c:68
void AdjustVehicleHealthServer(ActionData action_data)
Definition ActionRepairVehiclePartBase.c:35

Перекрестные ссылки AdjustItemQuantityServer() и AdjustVehicleHealthServer().

◆ ReadFromContext()

override bool ReadFromContext ( ParamsReadContext ctx,
out ActionReciveData action_recive_data )
inlineprotected
103 {
105 {
107 }
108
109 super.ReadFromContext(ctx, action_recive_data);
111
112 if (HasTarget())
113 {
114 string zone;
115 if (!ctx.Read(zone))
116 {
117 return false;
118 }
119
120 recieveDataRepair.m_DamageZoneRecived = zone;
121 }
122
123 return true;
124 }
bool HasTarget()
Definition ActionBase.c:244

Перекрестные ссылки ActionBase::HasTarget().

◆ WriteToContext()

override void WriteToContext ( ParamsWriteContext ctx,
ActionData action_data )
inlineprotected
91 {
92 super.WriteToContext(ctx, action_data);
94
96 {
98 ctx.Write(repairActionData.m_DamageZone);
99 }
100 }
Super root of all classes in Enforce script.
Definition EnScript.c:11
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

Перекрестные ссылки Class::CastTo(), ActionBase::HasTarget() и m_CurrentDamageZone.

Поля

◆ m_CurrentDamageZone


Объявления и описания членов класса находятся в файле: