Arsenal - Add ace_arsenal_loadoutVerified event (#9792)

Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
This commit is contained in:
Grim
2024-02-11 20:25:12 -03:00
committed by GitHub
parent b2849aaa29
commit 1e1d1d63f2
3 changed files with 25 additions and 8 deletions

View File

@ -19,7 +19,7 @@ private _extendedInfo = createHashMap;
// Check if the provided loadout is a CBA extended loadout
if (count _loadout == 2) then {
_extendedInfo = _loadout select 1;
_extendedInfo = +(_loadout select 1); // Copy the hashmap to prevent events from modifiyng the profileNamespace extendedInfo
_loadout = _loadout select 0;
};
@ -70,4 +70,7 @@ private _fnc_filterLoadout = {
// Loadout might come from a different modpack, which might have different config naming
_loadout = _loadout call _fnc_filterLoadout;
// Raise event for 3rd party: mostly for handling extended info
[QGVAR(loadoutVerified), [_loadout, _extendedInfo]] call CBA_fnc_localEvent;
[[_loadout, _extendedInfo], _nullItemsList arrayIntersect _nullItemsList, _unavailableItemsList arrayIntersect _unavailableItemsList]