245 {
246 float all_ingredients_health = 0;
247 float all_ingredients_health01 = 0;
248 int value_delta;
250 {
252 all_ingredients_health += ingrd.GetHealth("", "");
253 all_ingredients_health01 += ingrd.GetHealth01("", "");
254 }
255
257 {
259 if (!res)
260 {
261 continue;
262 }
263
264 if (res.IsItemBase())
265 {
267
269
270 if (!resIb.IsMagazine())
271 {
273 {
274 resIb.SetQuantityMax();
275 }
276 else if (value_delta != -1)
277 {
279 }
280 }
281 else
282 {
283 Magazine mgzn = Magazine.Cast(resIb);
285 {
286 mgzn.ServerSetAmmoMax();
287 }
288 else if (value_delta != -1)
289 {
290 mgzn.ServerSetAmmoCount(value_delta);
291 }
292 }
293 }
295 {
297 res.SetHealth("","",value_delta);
298 }
300 {
302 {
305
306 if (ing)
307 {
308 float ing_health01 = ing.GetHealth01("","");
309 res.SetHealth("", "", ing_health01 * res.GetMaxHealth("",""));
311 }
312 }
314 {
316 res.SetHealth("", "", average_health01 * res.GetMaxHealth("",""));
317 }
318 }
319
321 {
323 {
326
327 if (ingr)
328 {
329 MiscGameplayFunctions.TransferItemProperties(ingr, res);
330 MiscGameplayFunctions.TransferInventory(ingr, res, player);
331 }
332 }
333 }
334 }
335 }
class GP5GasMask extends MaskBase ItemBase
const int MAX_NUMBER_OF_INGREDIENTS
override bool SetQuantity(float value, bool destroy_config=true, bool destroy_forced=false, bool allow_client=false, bool clamp_to_stack_max=true)
float m_ResultSetHealth[MAXIMUM_RESULTS]
float m_ResultSetQuantity[MAXIMUM_RESULTS]
bool m_ResultSetFullQuantity[MAXIMUM_RESULTS]
int m_ResultReplacesIngredient[MAXIMUM_RESULTS]
int m_ResultInheritsHealth[MAXIMUM_RESULTS]