diff --git a/CHANGE LOG 1.0.6.1.txt b/CHANGE LOG 1.0.6.1.txt index 90f3812a9..59df1fe3e 100644 --- a/CHANGE LOG 1.0.6.1.txt +++ b/CHANGE LOG 1.0.6.1.txt @@ -40,6 +40,7 @@ [FIXED] Base objects duplicating when using "take ownership" on plot pole. #1811 @BNG-Lance @Clanwarfare [FIXED] Unable to sell some launchers like Javelin and Stinger which have the same classname for ammo and weapon. #1844 @ndavalos [FIXED] Long search delay when filling water bottles, drinking from hands and drinking from empty cans on Chernarus. #1835 @schwanzkopfhegel +[FIXED] Players can not purchase a negative number of items anymore. [NOTE] The fixes below are included in the 1.0.6 Build C server package released December 29th, 2016 (http://dayzepoch.com/a2dayzepoch.php) [FIXED] Hive child 309 errors that resulted in broken saving of newly built storage object inventory. @icomrade diff --git a/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_toBuyingList.sqf b/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_toBuyingList.sqf index 156056846..54054121f 100644 --- a/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_toBuyingList.sqf +++ b/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_toBuyingList.sqf @@ -3,15 +3,11 @@ private ["_amount","_index","_index2","_temp"]; _index = _this select 0; _amount = parseNumber(_this select 1); -if (!isNil "_index" && {_index > -1} && {typeName _amount == "SCALAR"}) then { +if (!isNil "_index" && {_index > -1} && {typeName _amount == "SCALAR"} && {_amount > 0}) then { _temp = [] + (Z_BuyableArray select _index); _temp set [9,(ceil _amount)]; Z_BuyingArray set [count(Z_BuyingArray),_temp]; - if (_amount > 0) then { - _index2 = lbAdd [Z_AT_BUYINGLIST, format["%1x: %2",_temp select 9,_temp select 3]]; - } else { - _index2 = lbAdd [Z_AT_BUYINGLIST, localize "STR_EPOCH_TRADE_NOT_SELLING"]; - }; + _index2 = lbAdd [Z_AT_BUYINGLIST, format["%1x: %2",_temp select 9,_temp select 3]]; lbSetPicture [Z_AT_BUYINGLIST, _index2, _temp select 4]; call Z_calcPrice; };