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

◆ RepairDamageTransfer()

void ActionRepairTent::RepairDamageTransfer ( PlayerBase player,
ItemBase repair_kit,
ItemBase item,
float specialty_weight,
string damage_zone = "" )
inlineprivate

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

156 {
157 float transfer_to_global_coef = 0;
158 array<string> transfer_zones = new array<string>;
159 string path = "" + CFG_VEHICLESPATH + " " + item.GetType() + " DamageSystem DamageZones " + damage_zone;
160 PluginRepairing module_repairing;
161 Class.CastTo(module_repairing, GetPlugin(PluginRepairing));
162
163 g_Game.ConfigGetTextArray("" + path + " transferToZonesNames", transfer_zones);
164
165 for (int i = 0; i < transfer_zones.Count(); i++)
166 {
167 transfer_to_global_coef += g_Game.ConfigGetFloat("" + path + " Health transferToGlobalCoef");
168 if (transfer_zones.Get(i) == damage_zone)
169 continue;
170
171 module_repairing.Repair(player,repair_kit,item,specialty_weight,transfer_zones.Get(i),false);
172 }
173
174 //finally, repairs global
175 if (transfer_to_global_coef > 0)
176 {
177 module_repairing.Repair(player,repair_kit,item,specialty_weight,"",false);
178 }
179 }
DayZGame g_Game
Определения DayZGame.c:4074
string path
Определения OptionSelectorMultistate.c:142
PluginBase GetPlugin(typename plugin_type)
Определения PluginManager.c:326
const string CFG_VEHICLESPATH
Определения 3_Game/DayZ/constants.c:228

Перекрестные ссылки Class::CastTo(), CFG_VEHICLESPATH, g_Game, GetPlugin() и path.

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