fnc_bandageAllWounds.sqf 782 B

12345678910111213141516171819202122232425262728
  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. _patient setVariable ["ace_medical_bandagedWounds", _openWounds, true];
  19. _patient setVariable ["ace_medical_openWounds", [], true];
  20. [_patient] call ace_medical_status_fnc_updateWoundBloodLoss;
  21. [_patient] call ace_medical_engine_fnc_updateDamageEffects;
  22. private _nearPlayers = (_patient nearEntities ["CAManBase", 6]) select {_x call ace_common_fnc_isPlayer};
  23. ["ace_interact_menu_clearConditionCaches", [], _nearPlayers] call CBA_fnc_targetEvent;