DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ OnFinishProgressServer()

override void ActionRepairTentPart::OnFinishProgressServer ( ActionData action_data)
inlineprivate

См. определение в файле ActionRepairTentPart.c строка 101

102 {
103 Object targetParent = action_data.m_Target.GetParent();
104 ItemBase usedItem = action_data.m_MainItem;
105
106 string damageZone = RepairTentPartActionData.Cast(action_data).m_DamageZone;
107 if (!GetGame().IsMultiplayer())
108 damageZone = m_CurrentDamageZone;
109
110 if ( targetParent && targetParent.IsInherited(TentBase) && damageZone != "" )
111 {
112 TentBase tent = TentBase.Cast( targetParent );
113 float m_RepairedLevel = usedItem.GetHealthLevel();
114
115 tent.SetAllowDamage(true);
116 targetParent.SetHealth01("" + damageZone, "", targetParent.GetHealthLevelValue(m_RepairedLevel));
117 tent.ProcessInvulnerabilityCheck(tent.GetInvulnerabilityTypeString());
118
119 if (usedItem.GetQuantity() > 1)
120 {
121 //Not really clean, but will do for now
122 int val = usedItem.GetQuantity();
123 val--;
124 usedItem.SetQuantity(val);
125 }
126 else
127 usedItem.Delete();
128 }
129 }
class GP5GasMask extends MaskBase ItemBase
string m_CurrentDamageZone
Определения ActionRepairTentPart.c:22
override bool SetQuantity(float value, bool destroy_config=true, bool destroy_forced=false, bool allow_client=false, bool clamp_to_stack_max=true)
Определения PileOfWoodenPlanks.c:88
class LOD Object
proto native CGame GetGame()

Перекрестные ссылки ActionData, GetGame(), m_CurrentDamageZone и ItemBase::SetQuantity().