Cargo - Add check for invoking ace_cargoAdded EH only if cargo was actually added (#10084)

Only invoke cargoAdded EH if cargo was actually added
This commit is contained in:
johnb432 2024-06-22 17:18:28 +02:00 committed by GitHub
parent 7ea2aab2c9
commit 18ea360b1e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -41,6 +41,8 @@ if (_item isEqualType "") then {
TRACE_1("loaded",_loaded);
// Invoke listenable event
["ace_cargoAdded", [_item, _vehicle, _loaded]] call CBA_fnc_globalEvent;
if (_loaded > 0) then {
["ace_cargoAdded", [_item, _vehicle, _loaded]] call CBA_fnc_globalEvent;
};
_loaded // return