From b8c3d6a325de7194a82bf85ccc94d47300febb8a Mon Sep 17 00:00:00 2001 From: vbawol Date: Wed, 23 Jan 2013 01:14:55 -0600 Subject: [PATCH] 0.77 fixes to qty check on purchases --- dayz_code/actions/trade_items.sqf | 3 ++- dayz_code/actions/trade_items_wo_db.sqf | 1 + dayz_code/actions/trade_weapons.sqf | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dayz_code/actions/trade_items.sqf b/dayz_code/actions/trade_items.sqf index 4bca29467..c4ace261a 100644 --- a/dayz_code/actions/trade_items.sqf +++ b/dayz_code/actions/trade_items.sqf @@ -1,4 +1,4 @@ -private["_iarray","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_textPartIn","_textPartOut","_bos"]; +private["_iarray","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_textPartIn","_textPartOut","_bos","_isOk"]; // [part_out,part_in, qty_out, qty_in,]; _activatingPlayer = _this select 1; @@ -21,6 +21,7 @@ if (_qty >= _qty_in) then { _bos = 1; }; + _isOk = false; if(_buy_o_sell == "buy") then { _config = (configFile >> "cfgMagazines" >> _part_out); _isOk = [player,_config] call BIS_fnc_invAdd; diff --git a/dayz_code/actions/trade_items_wo_db.sqf b/dayz_code/actions/trade_items_wo_db.sqf index 992e0ce62..c66929273 100644 --- a/dayz_code/actions/trade_items_wo_db.sqf +++ b/dayz_code/actions/trade_items_wo_db.sqf @@ -16,6 +16,7 @@ _qty = {_x == _part_in} count magazines player; if (_qty >= _qty_in) then { + _isOk = false; if(_buy_o_sell == "buy") then { _config = (configFile >> "cfgMagazines" >> _part_out); _isOk = [player,_config] call BIS_fnc_invAdd; diff --git a/dayz_code/actions/trade_weapons.sqf b/dayz_code/actions/trade_weapons.sqf index 1d83bc503..89f336076 100644 --- a/dayz_code/actions/trade_weapons.sqf +++ b/dayz_code/actions/trade_weapons.sqf @@ -1,4 +1,4 @@ -private["_iarray","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_traderID","_bos"]; +private["_iarray","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_traderID","_bos","_isOk"]; // [part_out,part_in, qty_out, qty_in,"buy"]; _activatingPlayer = _this select 1; @@ -23,7 +23,7 @@ if(_buy_o_sell == "buy") then { if (_qty >= _qty_in) then { - + _isOk = false; if(_buy_o_sell == "buy") then { _config = (configFile >> "cfgWeapons" >> _part_out); _isOk = [player,_config] call BIS_fnc_invAdd;