mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
e2ac18a05d
* advanced_ballistics * advanced_fatigue * advanced_throwing * ai * aircraft * arsenal * atragmx * attach * backpacks * ballistics * captives * cargo * chemlights * common * concertina_wire * cookoff * dagr * disarming * disposable * dogtags * dragging * explosives * fastroping * fcs * finger * frag * gestures * gforces * goggles * grenades * gunbag * hearing * hitreactions * huntir * interact_menu * interaction * inventory * kestrel4500 * laser * laserpointer * logistics_uavbattery * logistics_wirecutter * magazinerepack * map * map_gestures * maptools * markers * medical * medical_ai * medical_blood * medical_menu * microdagr * minedetector * missileguidance * missionmodules * mk6mortar * modules * movement * nametags * nightvision * nlaw * optics * optionsmenu * overheating * overpressure * parachute * pylons * quickmount * rangecard * rearm * recoil * refuel * reload * reloadlaunchers * repair * respawn * safemode * sandbag * scopes * slideshow * spectator * spottingscope * switchunits * tacticalladder * tagging * trenches * tripod * ui * vector * vehiclelock * vehicles * viewdistance * weaponselect * weather * winddeflection * yardage450 * zeus * arsenal defines.hpp * optionals * DEBUG_MODE_FULL 1 * DEBUG_MODE_FULL 2 * Manual fixes * Add SQF Validator check for #include after block comment * explosives fnc_openTimerUI * fix uniqueItems
43 lines
1.4 KiB
Plaintext
43 lines
1.4 KiB
Plaintext
#include "script_component.hpp"
|
|
/*
|
|
* Author: PabstMirror
|
|
* Sends all status effects for an object (can be run on non-local objects)
|
|
*
|
|
* Arguments:
|
|
* 0: Object <OBJECT>
|
|
* 1: Effect name (or "" to send all) <STRING>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [player, ""] call ace_common_fnc_statusEffect_sendEffects
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
params [["_object", objNull, [objNull]], ["_effectName", "", [""]]];
|
|
TRACE_2("params",_object,_effectName);
|
|
|
|
if (isNull _object) exitWith {};
|
|
|
|
{
|
|
if ((_effectName == "") || {_effectName == _x}) then {
|
|
private _effectVarName = format [QGVAR(effect_%1), _x];
|
|
private _effectNumber = _object getVariable [_effectVarName, -1];
|
|
|
|
//We only do anything if the effect has been defined at some point in the game for this unit
|
|
TRACE_2("checking if event is nil",_x,_effectNumber);
|
|
if (_effectNumber != -1) then {
|
|
private _eventName = format [QGVAR(%1), _x];
|
|
if (GVAR(statusEffect_isGlobal) select _forEachIndex) then {
|
|
TRACE_2("Sending Global Event", _object, _effectNumber);
|
|
[_eventName, [_object, _effectNumber]] call CBA_fnc_globalEvent;
|
|
} else {
|
|
TRACE_2("Sending Target Event", _object, _effectNumber);
|
|
[_eventName, [_object, _effectNumber], _object] call CBA_fnc_targetEvent;
|
|
};
|
|
};
|
|
};
|
|
} forEach GVAR(statusEffect_Names);
|