From 3ca8105e9eff22a11df632d1324332215037da9d Mon Sep 17 00:00:00 2001 From: Dedmen Miller Date: Wed, 11 Apr 2018 15:53:23 +0200 Subject: [PATCH] Improve Reload TakeEH (#6242) * Improve Reload TakeEH * Simplify explosives take EH --- addons/explosives/CfgEventHandlers.hpp | 2 +- addons/reload/CfgEventHandlers.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/explosives/CfgEventHandlers.hpp b/addons/explosives/CfgEventHandlers.hpp index ced23c6b56..37df24577d 100644 --- a/addons/explosives/CfgEventHandlers.hpp +++ b/addons/explosives/CfgEventHandlers.hpp @@ -24,7 +24,7 @@ class Extended_Killed_EventHandlers { class Extended_Take_EventHandlers { class CAManBase { - GVAR(takeHandler) = QUOTE([ARR_3(_this select 0, _this select 1, _this select 2)] call FUNC(onInventoryChanged)); + GVAR(takeHandler) = QUOTE(call FUNC(onInventoryChanged)); }; }; class Extended_Put_EventHandlers { diff --git a/addons/reload/CfgEventHandlers.hpp b/addons/reload/CfgEventHandlers.hpp index a3dd6de29b..6016e7712a 100644 --- a/addons/reload/CfgEventHandlers.hpp +++ b/addons/reload/CfgEventHandlers.hpp @@ -20,7 +20,7 @@ class Extended_PostInit_EventHandlers { class Extended_Take_EventHandlers { class CAManBase { class ACE_AmmoIndicatorReload { - clientTake = QUOTE(if (_this select 0 == ACE_player && {GVAR(DisplayText)} && {(_this select 1) in [ARR_3(uniformContainer (_this select 0), vestContainer (_this select 0), backpackContainer (_this select 0))]} && {_this select 2 == currentMagazine (_this select 0)}) then {[ARR_2(_this select 0, vehicle (_this select 0))] call FUNC(displayAmmo)};); + clientTake = QUOTE(params ['_unit']; if (_unit == ACE_player && {GVAR(DisplayText)} && {(_this select 1) in [ARR_3(uniformContainer _unit, vestContainer _unit, backpackContainer _unit)]} && {_this select 2 == currentMagazine _unit}) then {[ARR_2(_unit, vehicle _unit)] call FUNC(displayAmmo)};); }; }; };