Arsenal - Handle arrays in loadout extended info (#9918)

This commit is contained in:
Grim 2024-04-03 19:46:26 -03:00 committed by GitHub
parent a72b3a43a5
commit e6cc5fca89
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -22,6 +22,10 @@ private _extendedInfo = createHashMap;
// Check if the provided loadout is a CBA extended loadout
if (count _loadout == 2) then {
_extendedInfo = +(_loadout select 1); // Copy the hashmap to prevent events from modifiyng the profileNamespace extendedInfo
if (_extendedInfo isEqualType []) then { // Hashmaps are serialized as arrays, convert back to hashmap
_extendedInfo = createHashMapFromArray _extendedInfo;
_loadout set [1, _extendedInfo]; // Also fix source variable, technically not needed but doesn't hurt
};
_loadout = _loadout select 0;
};