From c17e7921b353b6385eab26b13b00d205bd6b7feb Mon Sep 17 00:00:00 2001 From: Jacob Schmidt Date: Sat, 5 Apr 2025 16:57:29 -0500 Subject: [PATCH] fix: Use EFUNC for org store verification in handlePurchase This commit fixes an issue in `fnc_handlePurchase.sqf` where the organization store was being accessed directly from the mission namespace. This has been updated to use the `EFUNC(org,verifyOrgStore)` function to ensure proper verification and access to the organization store. This change improves code maintainability and reduces the risk of errors due to incorrect store access. --- addons/store/functions/fnc_handlePurchase.sqf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/store/functions/fnc_handlePurchase.sqf b/addons/store/functions/fnc_handlePurchase.sqf index 48797ad..846936f 100644 --- a/addons/store/functions/fnc_handlePurchase.sqf +++ b/addons/store/functions/fnc_handlePurchase.sqf @@ -36,7 +36,7 @@ if (count _payment > 3) then { }; if (_payment select 0 == "Organization") then { - private _store = missionNamespace getVariable ["FORGE_ORG_STORE_REG", createHashMap]; + private _store = call EFUNC(org,verifyOrgStore); private _org = _store call ["getOrg", []]; private _ownerUID = _org get "owner"; @@ -49,7 +49,7 @@ if (_payment select 0 == "Organization") then { private _varType = _payment select 2; private _balance = switch (_varType) do { case "organization": { - private _store = missionNamespace getVariable ["FORGE_ORG_STORE_REG", createHashMap]; + private _store = call EFUNC(org,verifyOrgStore); _store call ["getFunds", []]; }; case "player": { player getVariable [_payment select 1, 0] }; @@ -64,7 +64,7 @@ if (_balance < _price) exitWith { switch (_varType) do { case "organization": { - private _store = missionNamespace getVariable ["FORGE_ORG_STORE_REG", createHashMap]; + private _store = call EFUNC(org,verifyOrgStore); _store call ["updateFunds", -_price]; }; case "player": {