mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Add PFH to throw the playerInventoryChanged ACE event
This commit is contained in:
parent
8467013c1a
commit
8b3c70a16d
@ -74,4 +74,15 @@ enableCamShake true;
|
||||
};
|
||||
}] call FUNC(addEventhandler);
|
||||
|
||||
GVAR(OldPlayerInventory) = ACE_player call FUNC(getAllGear);
|
||||
|
||||
// PFH to raise "playerInventoryChanged" event
|
||||
[{
|
||||
_newPlayerInventory = ACE_player call FUNC(getAllGear);
|
||||
|
||||
if !(_newPlayerInventory isEqualTo GVAR(OldPlayerInventory)) exitWith {
|
||||
// Raise ACE event
|
||||
GVAR(OldPlayerInventory) = _newPlayerInventory;
|
||||
["playerInventoryChanged", [ACE_player, _newPlayerInventory]] call FUNC(localEvent);
|
||||
};
|
||||
}, 0, []] call cba_fnc_addPerFrameHandler;
|
||||
|
Loading…
Reference in New Issue
Block a user