fnc_bandageAllWounds.sqf 837 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Author: M3ales
  3. *
  4. * Arguments:
  5. * Healer
  6. * Patient
  7. * Return Value:
  8. * Nothing
  9. *
  10. * Example:
  11. * [player, cursorTarget] call rd501_fnc_bandageAllWounds
  12. *
  13. * Public: No
  14. */
  15. params ["_healer", "_patient"];
  16. private _openWounds = (_patient getVariable ["ace_medical_openWounds", []]);
  17. if (_openWounds isEqualTo []) exitWith {};
  18. {
  19. _x params ["_classId", "_bodyPartN", "_amountOf", "_bloodloss", "_damage"];
  20. _x set [2,0];
  21. }forEach(_openWounds);
  22. _patient setVariable ["ace_medical_openWounds", _openWounds, true];
  23. [_patient] call ace_medical_status_fnc_updateWoundBloodLoss;
  24. [_patient] call ace_medical_engine_fnc_updateDamageEffects;
  25. private _nearPlayers = (_patient nearEntities ["CAManBase", 6]) select {_x call ace_common_fnc_isPlayer};
  26. ["ace_interact_menu_clearConditionCaches", [], _nearPlayers] call CBA_fnc_targetEvent;