From 9f8af554d4cd7d41fc3fa3e8db9f12e0093ac24a Mon Sep 17 00:00:00 2001 From: Luka <45039380+SgtLuka@users.noreply.github.com> Date: Fri, 26 Nov 2021 13:29:13 +0100 Subject: [PATCH] Fix safe coins refund when packing The check will always return 'false' because packedClass is a Weapon Holder (classname: WeaponHolder_xxx) and those aren't in DZE_MoneyStorageClasses. And there's no need for that check anyway because the _isZSC variable checks if it's a money storage. --- SQF/dayz_server/compile/server_handleSafeGear.sqf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SQF/dayz_server/compile/server_handleSafeGear.sqf b/SQF/dayz_server/compile/server_handleSafeGear.sqf index 66f77395e..148ef97b2 100644 --- a/SQF/dayz_server/compile/server_handleSafeGear.sqf +++ b/SQF/dayz_server/compile/server_handleSafeGear.sqf @@ -118,7 +118,7 @@ call { _weapons = getWeaponCargo _obj; _magazines = getMagazineCargo _obj; _backpacks = getBackpackCargo _obj; - if (_isZSC && {_packedClass in DZE_MoneyStorageClasses}) then {_coins = _obj getVariable ["cashMoney",0];}; + if (_isZSC) then {_coins = _obj getVariable ["cashMoney",0];}; _holder = _packedClass createVehicle [0,0,0]; deleteVehicle _obj; @@ -126,7 +126,7 @@ call { _holder setPosATL _pos; _holder addMagazineCargoGlobal [getText(configFile >> "CfgVehicles" >> _packedClass >> "seedItem"),1]; [_weapons,_magazines,_backpacks,_holder] call fn_addCargo; - if (_isZSC && {_packedClass in DZE_MoneyStorageClasses && {_coins > 0}}) then { + if (_isZSC && {_coins > 0}) then { private "_displayName"; _displayName = getText (configFile >> "CfgVehicles" >> _type >> "displayName"); @@ -172,4 +172,4 @@ diag_log _message; if (_status < 3) then { dze_waiting = "success"; _clientID publicVariableClient "dze_waiting"; -}; \ No newline at end of file +};