mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Common - Fix script error with uniqueItems in scheduled (#6998)
This commit is contained in:
parent
ab8fa78377
commit
c6609cbdb9
@ -11,7 +11,7 @@
|
||||
* Items <ARRAY>
|
||||
*
|
||||
* Example:
|
||||
* [_player] call ace_common_fnc_uniqueItems
|
||||
* [player] call ace_common_fnc_uniqueItems
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
@ -28,12 +28,10 @@ private _fnc_getItems = {
|
||||
|
||||
// Use cached items list if unit is ACE_player
|
||||
if (_unit isEqualTo ACE_player) then {
|
||||
private _items = GVAR(uniqueItemsCache);
|
||||
if (isNil "_items") then {
|
||||
_items = call _fnc_getItems;
|
||||
GVAR(uniqueItemsCache) = _items;
|
||||
if (isNil QGVAR(uniqueItemsCache)) then {
|
||||
GVAR(uniqueItemsCache) = call _fnc_getItems;
|
||||
};
|
||||
+_items
|
||||
+GVAR(uniqueItemsCache)
|
||||
} else {
|
||||
call _fnc_getItems;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user