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

◆ OnFinishProgressServer()

override void ActionCraftBolts::OnFinishProgressServer ( ActionData action_data)
inlineprotected

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

97 {
98 ItemBase knife;
99 ItemBase material;
100
101 bool added = false;
102
104 {
105 //knife in hands
106 knife = action_data.m_MainItem;
107 material = ItemBase.Cast(action_data.m_Target.GetObject());
108 }
109 else
110 {
111 // material in hands
112 material = action_data.m_MainItem;
113 knife = ItemBase.Cast(action_data.m_Target.GetObject());
114 }
115
116 if (!material || !knife)
117 return;
118
119 if (m_ResultEntity)
120 {
121 if (m_ResultEntity.GetAmmoCount() < m_ResultEntity.GetAmmoMax())
122 {
123 m_ResultEntity.ServerAddAmmoCount(1);
124 added = true;
125 }
126 }
127
128 if (!added)
129 {
130 m_ResultEntity = Ammunition_Base.Cast(action_data.m_Player.SpawnEntityOnGroundRaycastDispersed("Ammo_ImprovisedBolt_1"));
131 m_ResultEntity.SetHealth("", "", material.GetHealth("", ""));
132 m_ResultEntity.ServerSetAmmoCount(1);
133 }
134
135 material.AddQuantity(-1);
136 knife.AddHealth("","",-3);
137 }
Bolt_Base Ammunition_Base
class GP5GasMask extends MaskBase ItemBase
Ammunition_Base m_ResultEntity
Определения ActionCraftBolts.c:16
bool m_IsKnifeInHands
Определения ActionCraftBolts.c:15
PlayerBase m_Player
Определения ActionBase.c:40
ref ActionTarget m_Target
Определения ActionBase.c:39
ItemBase m_MainItem
Определения ActionBase.c:35

Перекрестные ссылки m_IsKnifeInHands, ActionData::m_MainItem, ActionData::m_Player, m_ResultEntity и ActionData::m_Target.