Skip to content

Commit

Permalink
Fix unique items
Browse files Browse the repository at this point in the history
  • Loading branch information
johnb432 committed Jul 3, 2024
1 parent b714c8b commit 7374a17
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions addons/common/functions/fnc_uniqueItems.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ private _fnc_getItems = {
_inventoryItems append ((getItemCargo vestContainer _target) select 0);
_inventoryItems append ((getItemCargo backpackContainer _target) select 0);

_items set [0, _inventoryItems];
_items set [1, magazines _target];
private _magazines = magazines _target;

_items arrayIntersect _items
_items set [0, _inventoryItems arrayIntersect _inventoryItems];
_items set [1, _magazines arrayIntersect _magazines];

_items
};

// Cache items list if unit is ACE_player
Expand Down

0 comments on commit 7374a17

Please sign in to comment.