From cc129cf403340e41ee061edd51a5db5d99d9dd25 Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Sat, 30 Jul 2016 12:28:33 -0400 Subject: [PATCH] Fix buyItems error from #1716 @oiad --- .../AdvancedTrading/functions/z_at_buyItems.sqf | 4 ++-- .../AdvancedTrading/functions/z_at_getContainer.sqf | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_buyItems.sqf b/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_buyItems.sqf index 43d53cbd2..6a6f358d6 100644 --- a/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_buyItems.sqf +++ b/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_buyItems.sqf @@ -104,8 +104,8 @@ if (Z_SingleCurrency) then { _enoughMoney = _moneyInfo select 0; }; -if (Z_SellingFrom == 0 && _backpacksToBuy >= 1) exitWith { systemChat localize "STR_EPOCH_TRADE_BAG_BAGS"; }; //backpack -if (Z_SellingFrom == 2 && !isNull _backpack) exitWith { systemChat localize "STR_EPOCH_TRADE_HAVE_BACKPACK"; }; //gear +if (Z_SellingFrom == 0 && _backpacksToBuy > 0) exitWith { systemChat localize "STR_EPOCH_TRADE_BAG_BAGS"; }; //backpack +if (Z_SellingFrom == 2 && !isNull _backpack && _backpacksToBuy > 0) exitWith { systemChat localize "STR_EPOCH_TRADE_HAVE_BACKPACK"; }; //gear if (_enoughMoney) then { if (_canBuy) then { diff --git a/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_getContainer.sqf b/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_getContainer.sqf index 9c6d55166..6b7367389 100644 --- a/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_getContainer.sqf +++ b/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_getContainer.sqf @@ -23,7 +23,7 @@ call Z_calcPrice; if (Z_Selling) then { switch (_lbIndex) do { - case 0: { + case 0: { //backpack if (!isNull _backpack) then { [localize "STR_EPOCH_TRADE_SELLING_BACKPACK"] call Z_filleTradeTitle; Z_SellingFrom = 0; @@ -33,7 +33,7 @@ if (Z_Selling) then { ctrlSetText [Z_AT_SLOTSDISPLAY, " "]; }; }; - case 1: { + case 1: { //vehicle _canBuyInVehicle = true call Z_checkCloseVehicle; if (_canBuyInVehicle) then { [localize "STR_EPOCH_TRADE_SELLING_VEHICLE"] call Z_filleTradeTitle; @@ -44,7 +44,7 @@ if (Z_Selling) then { ctrlSetText [Z_AT_SLOTSDISPLAY, " "]; }; }; - case 2: { + case 2: { //gear [localize "STR_EPOCH_TRADE_SELLING_GEAR"] call Z_filleTradeTitle; Z_SellingFrom = 2; call Z_getGearItems; @@ -54,7 +54,7 @@ if (Z_Selling) then { ctrlSetText [Z_AT_TRADERLINE2, " "]; ctrlSetText [Z_AT_TRADERLINE1, localize "STR_EPOCH_TRADE_SELLING_ALL"]; switch (_lbIndex) do { - case 0: { + case 0: { //backpack if (!isNull _backpack) then { Z_SellingFrom = 0; [localize "STR_EPOCH_TRADE_BUYING_BACKPACK"] call Z_filleTradeTitle; @@ -64,7 +64,7 @@ if (Z_Selling) then { ctrlSetText [Z_AT_SLOTSDISPLAY, " "]; }; }; - case 1: { + case 1: { //vehicle _canBuyInVehicle = true call Z_checkCloseVehicle; if (_canBuyInVehicle) then { Z_SellingFrom = 1; @@ -75,7 +75,7 @@ if (Z_Selling) then { ctrlSetText [Z_AT_SLOTSDISPLAY, " "]; }; }; - case 2: { + case 2: { //gear Z_SellingFrom = 2; [localize "STR_EPOCH_TRADE_BUYING_GEAR"] call Z_filleTradeTitle; [2] call Z_calculateFreeSpace;