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

◆ RepairDamageTransfer()

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

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

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

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

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