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

◆ OnFinishProgressServer()

override void ActionRepairTentPart::OnFinishProgressServer ( ActionData action_data)
inlineprivate

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

101 {
102 Object targetParent = action_data.m_Target.GetParent();
103 ItemBase usedItem = action_data.m_MainItem;
104
105 string damageZone = RepairTentPartActionData.Cast(action_data).m_DamageZone;
106 if (!g_Game.IsMultiplayer())
107 damageZone = m_CurrentDamageZone;
108
109 if ( targetParent && targetParent.IsInherited(TentBase) && damageZone != "" )
110 {
111 TentBase tent = TentBase.Cast( targetParent );
112 float m_RepairedLevel = usedItem.GetHealthLevel();
113
114 tent.SetAllowDamage(true);
115 targetParent.SetHealth01("" + damageZone, "", targetParent.GetHealthLevelValue(m_RepairedLevel));
116 tent.ProcessInvulnerabilityCheck(tent.GetInvulnerabilityTypeString());
117
118 if (usedItem.GetQuantity() > 1)
119 {
120 //Not really clean, but will do for now
121 int val = usedItem.GetQuantity();
122 val--;
123 usedItem.SetQuantity(val);
124 }
125 else
126 usedItem.Delete();
127 }
128 }
DayZGame g_Game
Определения DayZGame.c:4074
class GP5GasMask extends MaskBase ItemBase
ref ActionTarget m_Target
Определения ActionBase.c:39
ItemBase m_MainItem
Определения ActionBase.c:35
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)
Определения PileOfBricks.c:64
class LOD Object

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