Don't clear buying list on category switch + AdvTrade fixes

The buying list now acts like a shopping cart. It is no longer cleared
when switching between categories or containers. Closing the dialog or
switching to sell mode still clears it.

Also fixed:
- Filter button in sell mode
- Bug where filtering sellable list readded items already moved to
selling list
- Visual price display not clearing when remove all button is used on
buying list
- Gear container picture showing rank instead of portrait in buy mode
- Dialog is no longer closed when trying to sell zero items
- LbCurSel is now reset when the buyable list is cleared
- Category is no longer opened onLbSelChanged. Instead you need to
double click or use the "View" button, so the arrow keys can be used for
selecting too.
This commit is contained in:
ebaydayz
2016-07-27 18:40:03 -04:00
parent bd91044e7b
commit f84140c555
36 changed files with 128 additions and 118 deletions

View File

@@ -92,7 +92,7 @@ class AdvancedTrading
x = 0.51 * safezoneW + safezoneX;
y = 0.26 * safezoneH + safezoneY;
w = 0.08 * safezoneW;
onButtonClick = "Z_CategoryView = true; call Z_ChangeBuySell;";
onButtonClick = "Z_CategoryView = true; Z_ResetContainer = true; call Z_ChangeBuySell;";
colorBackground[] = {1,1,1,1};
color[] = {0,0,0,1};
};
@@ -123,7 +123,7 @@ class AdvancedTrading
x = 0.21 * safezoneW + safezoneX;
y = 0.33 * safezoneH + safezoneY;
w = 0.08 * safezoneW;
onButtonClick = "Z_Selling = !Z_Selling; Z_CategoryView = true; call Z_ChangeBuySell;";
onButtonClick = "Z_Selling = true; Z_CategoryView = true; call Z_ChangeBuySell;"; //Z_Selling is flipped in ChangeBuySell
colorBackground[] = {1,1,1,1};
color[] = {0,0,0,1};
};
@@ -232,7 +232,8 @@ class AdvancedTrading
soundSelect[] = {"",0.1,1};
colorBackground[] = {0.1,0.1,0.1,0.8};
onload = "ctrlShow [_this,false]";
onLBSelChanged = "if (Z_CategoryView) then {(lbCurSel 7421) call Z_fillCategoryList} else {['buyable',(lbCurSel 7421)] call Z_getItemInfo};";
onLBDblClick = "if (Z_CategoryView) then {(lbCurSel 7421) call Z_fillCategoryList;};";
onLBSelChanged = "if (!Z_CategoryView) then {['buyable',(lbCurSel 7421)] call Z_getItemInfo;};";
class ListScrollBar: ZSC_RscScrollBar{};
class ScrollBar
{
@@ -296,7 +297,7 @@ class AdvancedTrading
x = 0.21 * safezoneW + safezoneX;
y = 0.77 * safezoneH + safezoneY;
w = 0.13 * safezoneW;
onButtonClick = "if (Z_CategoryView) then {(lbCurSel 7421) call Z_fillCategoryList} else {[(ctrlText 7444)] call Z_filterList};";
onButtonClick = "if (Z_CategoryView && !Z_Selling) then {(lbCurSel 7421) call Z_fillCategoryList} else {[(ctrlText 7444)] call Z_filterList};";
colorBackground[] = {1,1,1,1};
color[] = {0,0,0,1};
};

View File

@@ -1,76 +1,75 @@
private ["_arrayOfTraderCat","_counter","_cat","_cfgtraders","_y","_type","_buy","_sell","_pic","_text","_worth","_buyCurrency","_sellCurrency","_ignore","_categoryNumber"];
call Z_clearBuyList;
call Z_clearBuyingList;
Z_BuyableArray = [];
Z_BuyingArray = [];
_arrayOfTraderCat = Z_traderData;
_counter = 0;
{
_categoryNumber = if (Z_CategoryView) then {_this} else {(_arrayOfTraderCat select _forEachIndex select 1)};
_cat = format["Category_%1",_categoryNumber];
_cfgtraders = missionConfigFile >> "CfgTraderCategory" >> _cat;
if (isNumber (_cfgtraders >> "duplicate")) then {
_cat = format["Category_%1",getNumber (_cfgtraders >> "duplicate")];
_cfgtraders = missionConfigFile >> "CfgTraderCategory" >> _cat;
};
for "_i" from 0 to (count _cfgtraders) - 1 do
{
_y = _cfgtraders select _i;
if (isClass _y) then
_categoryNumber = _x select 1;
if (_categoryNumber == _this) exitWith {
_cat = format["Category_%1",_categoryNumber];
_cfgtraders = missionConfigFile >> "CfgTraderCategory" >> _cat;
if (isNumber (_cfgtraders >> "duplicate")) then {
_cat = format["Category_%1",getNumber (_cfgtraders >> "duplicate")];
_cfgtraders = missionConfigFile >> "CfgTraderCategory" >> _cat;
};
for "_i" from 0 to (count _cfgtraders) - 1 do
{
_y = configName (_y );
_y = _cfgtraders select _i;
if (isClass _y) then
{
_y = configName (_y );
_type = getText(missionConfigFile >> "CfgTraderCategory" >> _cat >> _y >> "type");
_buy = getArray(missionConfigFile >> "CfgTraderCategory" >> _cat >> _y >> "buy");
_sell = getArray(missionConfigFile >> "CfgTraderCategory" >> _cat >> _y >> "sell");
_pic = "";
_text = "";
_buyCurrency = "";
_sellCurrency = "";
_worth = 0;
_ignore = false;
if (dayz_classicBloodBagSystem && _y in dayz_typedBags) then {
if (_y == "bloodBagONEG") then {_y = "ItemBloodbag";} else {_ignore = true;};
};
if(_type == "trade_items")then{
_pic = getText (configFile >> 'CfgMagazines' >> _y >> 'picture');
_text = getText (configFile >> 'CfgMagazines' >> _y >> 'displayName');
};
if(_type == "trade_weapons")then{
_pic = getText (configFile >> 'CfgWeapons' >> _y >> 'picture');
_text = getText (configFile >> 'CfgWeapons' >> _y >> 'displayName');
};
if(_type in ["trade_backpacks", "trade_any_vehicle", "trade_any_vehicle_free", "trade_any_vehicle_old", "trade_any_bicycle", "trade_any_bicycle_old", "trade_any_boat", "trade_any_boat_old"])then{
_pic = getText (configFile >> 'CfgVehicles' >> _y >> 'picture');
_text = getText (configFile >> 'CfgVehicles' >> _y >> 'displayName');
};
if(!Z_SingleCurrency) then {
_buyCurrency = _buy select 1;
_sellCurrency = _sell select 1,
_part = (configFile >> "CfgMagazines" >> _buyCurrency);
_worth = getNumber(_part >> "worth");
if (_worth == 0) then {
_worth = DZE_GemWorthList select (DZE_GemList find _buyCurrency);
_type = getText(missionConfigFile >> "CfgTraderCategory" >> _cat >> _y >> "type");
_buy = getArray(missionConfigFile >> "CfgTraderCategory" >> _cat >> _y >> "buy");
_sell = getArray(missionConfigFile >> "CfgTraderCategory" >> _cat >> _y >> "sell");
_pic = "";
_text = "";
_buyCurrency = "";
_sellCurrency = "";
_worth = 0;
_ignore = false;
if (dayz_classicBloodBagSystem && _y in dayz_typedBags) then {
if (_y == "bloodBagONEG") then {_y = "ItemBloodbag";} else {_ignore = true;};
};
}else{
_buyCurrency = CurrencyName;
_sellCurrency = CurrencyName;
};
if (!_ignore) then {
Z_BuyableArray set [count(Z_BuyableArray) , [_y,_type,_buy select 0,_text,_pic,_forEachIndex,_sell select 0, _buyCurrency, _sellCurrency, 0,_cat, _worth]];
if(_type == "trade_items")then{
_pic = getText (configFile >> 'CfgMagazines' >> _y >> 'picture');
_text = getText (configFile >> 'CfgMagazines' >> _y >> 'displayName');
};
if(_type == "trade_weapons")then{
_pic = getText (configFile >> 'CfgWeapons' >> _y >> 'picture');
_text = getText (configFile >> 'CfgWeapons' >> _y >> 'displayName');
};
if(_type in ["trade_backpacks", "trade_any_vehicle", "trade_any_vehicle_free", "trade_any_vehicle_old", "trade_any_bicycle", "trade_any_bicycle_old", "trade_any_boat", "trade_any_boat_old"])then{
_pic = getText (configFile >> 'CfgVehicles' >> _y >> 'picture');
_text = getText (configFile >> 'CfgVehicles' >> _y >> 'displayName');
};
if(!Z_SingleCurrency) then {
_buyCurrency = _buy select 1;
_sellCurrency = _sell select 1,
_part = (configFile >> "CfgMagazines" >> _buyCurrency);
_worth = getNumber(_part >> "worth");
if (_worth == 0) then {
_worth = DZE_GemWorthList select (DZE_GemList find _buyCurrency);
};
}else{
_buyCurrency = CurrencyName;
_sellCurrency = CurrencyName;
};
if (!_ignore) then { // Fill buyable list for one category only
Z_BuyableArray set [count Z_BuyableArray, [_y,_type,_buy select 0,_text,_pic,_forEachIndex,_sell select 0, _buyCurrency, _sellCurrency, 0,_cat, _worth]];
};
};
};
};
if (Z_CategoryView) exitWith { // Only filling items for one category
Z_CategoryView = false;
Z_Selling = !Z_Selling;
call Z_ChangeBuySell;
};
}forEach _arrayOfTraderCat;
Z_CategoryView = false;
Z_Selling = true; // flipped in ChangeBuySell
call Z_ChangeBuySell;
Z_OriginalBuyableArray = [] + Z_BuyableArray;
call Z_fillBuyableList;
call Z_calcPrice;

View File

@@ -4,7 +4,7 @@
* Calculate the total price for single currency.
**/
private ["_sellPrice","_ctrltext"];
#include "defines.sqf";
#include "defines.hpp"
_sellPrice = 0;

View File

@@ -1,7 +1,7 @@
private["_selection","_returnArray","_allowedMags","_allowedWeapons","_allowedBackpacks","_allowedTools","_allowedPrimary","_allowedSidearm","_formattedText","_pic"
,"_backpack","_vehicleWeapons","_vehicleMagazines","_vehicleBackpacks","_tempWeaponsArray","_tempBackpackArray","_tempMagazinesArray","_actualMags"
,"_normalMags","_normalWeaps","_kinds","_kinds2","_amounts","_amounts2","_counter"];
#include "defines.sqf";
#include "defines.hpp"
_selection = _this select 0;
_returnArray = [0,0,0];
@@ -11,11 +11,11 @@ if(_selection == 2) then{ //gear
// 12 toolbelt + 1 Binoculars + 1 NVG + 1 Pistol + 1 Primary (onBack isn't counted in weapons player)
_allowedWeapons = 16 - count(weapons player);
_pic = getText (configFile >> 'CfgVehicles' >> (typeOf player) >> 'picture');
_pic = getText (configFile >> 'CfgVehicles' >> (typeOf player) >> 'portrait');
_formattedText = format [
"<img image='%1' size='3' align='center'/>"
, _pic
"<t size='1' align='center' color='#ffffff'>%2</t><br />" +
"<img image='%1' size='3' align='center'/><br />"
, _pic, localize "STR_UI_GEAR"
];
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_CONTAINERINFO) ctrlSetStructuredText parseText _formattedText;

View File

@@ -1,9 +1,10 @@
#include "defines.sqf";
#include "defines.hpp"
Z_Selling = !Z_Selling;
if(Z_Selling)then{
if (Z_Selling) then {
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_SELLBUYTOGGLE) ctrlSetText localize "STR_EPOCH_PLAYER_291";
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_RIGHTLISTTITLE) ctrlSetText localize "STR_EPOCH_TRADE_SELLING";
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_FILTERBUTTON) ctrlSetText localize "STR_UI_FILTER";
{ctrlShow [_x,true];} forEach [Z_AT_SELLABLELIST,Z_AT_SELLINGLIST,Z_AT_SELLBUTTON,Z_AT_ADDSELLITEMBUTTON,Z_AT_ADDALLSELLITEMBUTTON,Z_AT_REMOVESELLITEMBUTTON,Z_AT_REMOVEALLSELLITEMBUTTON,Z_AT_FILTERBOX]; // show
{ctrlShow [_x,false];} forEach [Z_AT_BUYABLELIST,Z_AT_BUYINGLIST,Z_AT_BUYBUTTON,Z_AT_ADDBUYITEMBUTTON,Z_AT_BUYINGAMOUNT,Z_AT_REMOVEBUYITEMBUTTON,Z_AT_REMOVEALLBUYITEMBUTTON,Z_AT_SLOTSDISPLAY,Z_AT_BACKBUTTON]; // hide
}else{
@@ -19,9 +20,18 @@ if(Z_Selling)then{
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_FILTERBUTTON) ctrlSetText localize "STR_EPOCH_VIEW";
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_BUYABLELIST) ctrlSetFontHeight 0.026; // Slightly bigger in category view
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_BUYABLELIST) ctrlCommit 0;
{ctrlShow [_x,false];} forEach [Z_AT_ADDBUYITEMBUTTON,Z_AT_BUYINGAMOUNT,Z_AT_REMOVEBUYITEMBUTTON,Z_AT_REMOVEALLBUYITEMBUTTON,Z_AT_FILTERBOX,Z_AT_BACKBUTTON]; // hide
{ctrlShow [_x,false];} forEach [Z_AT_ADDBUYITEMBUTTON,Z_AT_BUYINGAMOUNT,Z_AT_FILTERBOX,Z_AT_BACKBUTTON]; // hide
call Z_fillCategories;
};
};
[2] call Z_getContainer; // default gear
if (Z_ResetContainer) then {
//Only reset to gear if dialog was closed or switching between buy and sell modes
Z_ResetContainer = false;
[2] call Z_getContainer;
} else {
// Switching between categories
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_ITEMINFO) ctrlSetStructuredText parseText "";
ctrlSetText [Z_AT_TRADERLINE2, " "];
ctrlSetText [Z_AT_TRADERLINE1, localize "STR_EPOCH_TRADE_SELLING_ALL"];
};

View File

@@ -9,7 +9,7 @@
* Fills up the sell or buy list if the item has a valid config.
**/
private ["_weaps","_mags","_extraText","_all","_total","_arrayOfTraderCat","_totalPrice","_ctrltext","_backUpText","_bags"];
#include "defines.sqf";
#include "defines.hpp"
_weaps = _this select 0;
_mags = _this select 1;

View File

@@ -3,5 +3,6 @@
*
* Clears the visual listbox of items you could buy.
**/
#include "defines.sqf";
#include "defines.hpp"
lbClear Z_AT_BUYABLELIST;
lbSetCurSel [Z_AT_BUYABLELIST,-1]; // clear

View File

@@ -4,5 +4,5 @@
* Clears the visual listbox of items you were going to buy.
**/
#include "defines.sqf";
#include "defines.hpp"
lbClear Z_AT_BUYINGLIST;

View File

@@ -3,6 +3,6 @@
*
* Clears the visual listbox of items you were going to sell and could be selled.
**/
#include "defines.sqf";
#include "defines.hpp"
lbClear Z_AT_SELLABLELIST;
lbClear Z_AT_SELLINGLIST;

View File

@@ -3,5 +3,5 @@
*
* Clears the visual listbox of items you were going to sell.
**/
#include "defines.sqf";
#include "defines.hpp"
lbClear Z_AT_SELLABLELIST;

View File

@@ -2,7 +2,7 @@ private ["_item","_picture","_class","_display","_transportMaxWeapons","_transpo
,"_buyCurrency","_sellCurrency","_formattedText","_picBuy","_picSell"
];
#include "defines.sqf";
#include "defines.hpp"
_item = _this select 0;

View File

@@ -1,5 +1,5 @@
private ['_item','_picture','_class','_display','_buyPrice','_sellPrice','_formattedText','_buyCurrency','_sellCurrency','_compatible','_weapon','_attach','_config','_compatibleText','_type','_text'];
#include "defines.sqf";
#include "defines.hpp"
_item = _this select 0;
_picture = _item select 4;
_class = _item select 0;

View File

@@ -3,7 +3,7 @@ private ['_item', '_type','_picture',"_class","_display","_transportMaxWeapons",
"_weapons2","_config","_wepText","_turret","_text"
];
#include "defines.sqf";
#include "defines.hpp"
_item = _this select 0;

View File

@@ -1,5 +1,5 @@
private ["_item","_picture","_class","_display","_buyPrice","_sellPrice","_magazines","_magText","_formattedText","_buyCurrency","_sellCurrency","_attachments","_attachText","_config","_text","_attach","_type"];
#include "defines.sqf";
#include "defines.hpp"
_item = _this select 0;
_picture = _item select 4;

View File

@@ -1,5 +1,5 @@
#include "defines.sqf";
#include "defines.hpp"
{
_index = lbAdd [Z_AT_BUYABLELIST, _x select 3];
lbSetPicture [Z_AT_BUYABLELIST, _index, _x select 4 ];
}count Z_BuyableArray;
} count Z_BuyableArray;

View File

@@ -1,4 +1,4 @@
#include "defines.sqf";
#include "defines.hpp"
{
_index = lbAdd [Z_AT_BUYINGLIST, _x select 3];
lbSetPicture [Z_AT_BUYINGLIST, _index, _x select 4];

View File

@@ -1,7 +1,6 @@
private "_index";
#include "defines.sqf";
#include "defines.hpp"
call Z_clearBuyList;
call Z_clearBuyingList;
{
_index = lbAdd [Z_AT_BUYABLELIST,_x select 0];

View File

@@ -1,5 +1,5 @@
private ["_categoryName","_categoryNumber"];
#include "defines.sqf";
#include "defines.hpp"
_categoryName = lbText [Z_AT_BUYABLELIST,_this];
{

View File

@@ -3,7 +3,7 @@
*
* Visualy fills in the listbox of items that can be sold.
**/
#include "defines.sqf";
#include "defines.hpp"
{
_index = lbAdd [Z_AT_SELLABLELIST, _x select 3];
lbSetPicture [Z_AT_SELLABLELIST, _index, _x select 4 ];

View File

@@ -3,7 +3,7 @@
*
* Visualy fills in the listbox of items currently being sold.
**/
#include "defines.sqf";
#include "defines.hpp"
{
_index = lbAdd [Z_AT_SELLINGLIST, _x select 3];
lbSetPicture [Z_AT_SELLINGLIST, _index, _x select 4];

View File

@@ -5,6 +5,6 @@
*
* Changes the indication of where you are selling/buying from in the trade window.
**/
#include "defines.sqf";
#include "defines.hpp"
_text = _this select 0;
ctrlSetText [Z_AT_CONTAINERINDICATOR, _text];

View File

@@ -9,6 +9,7 @@
if(count _this > 0) then {
_query = _this select 0; // the search string.
if(Z_Selling)then {
if (count Z_SellArray > 0) exitWith {}; //Do not filter if items already in selling list (dupes)
if(isNil '_query' || _query == "") then {
_newSellArray = [];
{

View File

@@ -3,7 +3,7 @@
*
* Gets all your items stored in your backpack and innitiates the selling list.
**/
#include "defines.sqf";
#include "defines.hpp"
private ["_backpack","_pic","_formattedText","_mags","_weaps","_normalMags","_normalWeaps","_kinds","_kinds2","_ammmounts","_ammmounts2","_ctrltext"];
call Z_clearLists;
Z_SellableArray = [];

View File

@@ -3,20 +3,20 @@
*
* Switches between selling and buying and the item container (gear/vehicle/bakcpack) and initiates item loading.
**/
private ["_lbIndex","_formattedText","_canBuyInVehicle"];
#include "defines.sqf";
private ["_lbIndex","_canBuyInVehicle"];
#include "defines.hpp"
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_SLOTSDISPLAY) ctrlSetText format["0 / 0 / 0"];
call Z_clearBuyingList;
if (Z_Selling) then {
call Z_clearBuyingList;
Z_BuyingArray = [];
};
call Z_clearLists;
Z_SellableArray = [];
Z_SellArray = [];
Z_BuyingArray = [];
_lbIndex = _this select 0;
_formattedText = format [''];
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_ITEMINFO) ctrlSetStructuredText parseText _formattedText;
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_ITEMINFO) ctrlSetStructuredText parseText "";
call Z_calcPrice;
@@ -39,13 +39,9 @@ if(Z_Selling)then{
};
};
}else{
_ctrltext = format[" "];
ctrlSetText [Z_AT_TRADERLINE2, _ctrltext];
_ctrltext = localize "STR_EPOCH_TRADE_SELLING_ALL";
ctrlSetText [Z_AT_TRADERLINE1, _ctrltext];
ctrlSetText [Z_AT_TRADERLINE2, " "];
ctrlSetText [Z_AT_TRADERLINE1, localize "STR_EPOCH_TRADE_SELLING_ALL"];
switch (_lbIndex) do {
case 0: {
Z_SellingFrom = 0;
[localize "STR_EPOCH_TRADE_BUYING_BACKPACK"] call Z_filleTradeTitle;

View File

@@ -4,7 +4,7 @@
* Gets all your items stored in your gear and innitiates the selling list.
**/
private ["_mags","_weaps","_skin","_formattedText","_bag","_bags"];
#include "defines.sqf";
#include "defines.hpp"
call Z_clearLists;
Z_SellArray = [];
Z_SellableArray = [];

View File

@@ -1,5 +1,5 @@
#include "defines.sqf";
#include "defines.hpp"
private ['_item', '_type'];
_item = _this select 0;
_type = _item select 1;

View File

@@ -3,7 +3,7 @@
*
* Gets all your items stored in your vehicle and innitiates the selling list.
**/
#include "defines.sqf";
#include "defines.hpp"
Z_vehicle = objNull;
call Z_clearLists;
Z_SellableArray = [];

View File

@@ -1,4 +1,4 @@
#include "defines.sqf";
#include "defines.hpp"
_index = _this select 0;
if(!isNil"_index" && _index > -1)then {
lbDelete [Z_AT_SELLABLELIST, _index];

View File

@@ -1,2 +1,3 @@
call Z_clearBuyingList;
Z_BuyingArray = [];
call Z_calcPrice;

View File

@@ -1,4 +1,4 @@
#include "defines.sqf";
#include "defines.hpp"
_index = _this select 0;
if(!isNil"_index" && _index > -1)then {
lbDelete [Z_AT_BUYINGLIST, _index];

View File

@@ -1,4 +1,4 @@
#include "defines.sqf";
#include "defines.hpp"
_index = _this select 0;
if(!isNil"_index" && _index > -1)then {
lbDelete [Z_AT_SELLINGLIST, _index];

View File

@@ -1,5 +1,7 @@
private ["_tempArray","_outcome","_vehCheckArray","_vehArray","_weaponsArray","_itemsArray","_bpArray","_bpCheckArray","_weaponsCheckArray","_itemsCheckArray","_VehKey","_wA","_mA","_money","_itemData","_success","_bag","_itemsToLog","_tCost","_tSold"];
if (count Z_SellArray < 1) exitWith { systemChat localize "STR_EPOCH_TRADE_SELL_NO_ITEMS"; };
_tempArray = Z_SellArray;
closeDialog 2;
_outcome = [];
@@ -13,8 +15,6 @@ _weaponsCheckArray = [];
_itemsCheckArray = [];
_itemsToLog = [[],[],[],"sell"];
if (count Z_SellArray < 1) exitWith { systemChat localize "STR_EPOCH_TRADE_SELL_NO_ITEMS"; };
_deleteTradedVehicle = {
private ["_localResult2","_VehKey2"];
_VehKey2 = (_this select 0) select 0;

View File

@@ -1,6 +1,6 @@
private ["_amount","_index","_index2","_temp"];
#include "defines.sqf";
#include "defines.hpp"
_index = _this select 0;
_amount = parseNumber(_this select 1);
if(!isNil"_index" && _index > -1 && (typeName _amount == "SCALAR") && _amount > 0 )then {

View File

@@ -11,7 +11,7 @@ if(DZE_ActionInProgress) exitWith { localize "str_player_actionslimit" call dayz
if(isNil "Z_AdvancedTradingInit")then{
//#include "config.sqf"; // Moved to dayz_code/configVariables.sqf
#include "\z\addons\dayz_code\actions\AdvancedTrading\functions\defines.sqf";
#include "\z\addons\dayz_code\actions\AdvancedTrading\functions\defines.hpp"
/* Configs that needs to be defined but not changed in config file */
@@ -106,6 +106,8 @@ if(isNil "Z_AdvancedTradingInit")then{
Z_Selling = true; // Always start menu in buy mode (flipped in z_at_changeBuySell.sqf on startup)
Z_CategoryView = true; // Always start in category view
Z_BuyingArray = [];
Z_ResetContainer = true;
createDialog "AdvancedTrading";
(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_REMOVESELLITEMBUTTON) ctrlSetText " < ";