diff --git a/addons/common/RscInfoType.hpp b/addons/common/RscInfoType.hpp index 0b499bc9ac..d0b08c50c2 100644 --- a/addons/common/RscInfoType.hpp +++ b/addons/common/RscInfoType.hpp @@ -22,7 +22,7 @@ class RscInGameUI { }; class RscDisplayInventory { - onLoad = "[""onLoad"",_this,""RscDisplayInventory"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""; {_this call _x} forEach ((missionNamespace getVariable ['ACE_onLoadInventory', [-1, [], []]]) select 2);"; + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDisplayInventory"",'IGUI')] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""; [ARR_2('inventoryDisplayLoaded', _this)] call FUNC(localEvent);); }; class RscDisplayChannel { diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf index 27ff8915b7..e15792b0d8 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -7,7 +7,6 @@ PREP(addActionMenuEventHandler); PREP(addCameraEventHandler); PREP(addCustomEventHandler); PREP(addMapMarkerCreatedEventHandler); -PREP(addInventoryDisplayLoadedEventHandler); PREP(addScrollWheelEventHandler); PREP(adminKick); PREP(ambientBrightness); @@ -100,7 +99,6 @@ PREP(removeActionEventHandler); PREP(removeActionMenuEventHandler); PREP(removeCameraEventHandler); PREP(removeCustomEventHandler); -PREP(removeInventoryDisplayLoadedEventHandler); PREP(removeMapMarkerCreatedEventHandler); PREP(removeScrollWheelEventHandler); PREP(restoreVariablesJIP); diff --git a/addons/disposable/XEH_postInitClient.sqf b/addons/disposable/XEH_postInitClient.sqf index 5ff5752f69..17911f5da5 100644 --- a/addons/disposable/XEH_postInitClient.sqf +++ b/addons/disposable/XEH_postInitClient.sqf @@ -5,9 +5,9 @@ #include "script_component.hpp" if (isNil QGVAR(UpdateInventoryDisplay_EHID)) then { - GVAR(UpdateInventoryDisplay_EHID) = [{ + GVAR(UpdateInventoryDisplay_EHID) = ["inventoryDisplayLoaded",{ _player = ACE_player; [_player, secondaryWeapon _player] call FUNC(takeLoadedATWeapon); [_player, (_this select 0)] call FUNC(updateInventoryDisplay); - }] call EFUNC(common,addInventoryDisplayLoadedEventHandler); + }] call EFUNC(common,addEventHandler); };