mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
Add swap for classicBloodBagSystem in Adv. Trade
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
private ["_arrayOfTraderCat","_counter","_cat","_cfgtraders","_y","_type","_buy","_sell","_pic","_text","_worth","_buyCurrency","_sellCurrency"];
|
private ["_arrayOfTraderCat","_counter","_cat","_cfgtraders","_y","_type","_buy","_sell","_pic","_text","_worth","_buyCurrency","_sellCurrency","_ignore"];
|
||||||
call Z_clearBuyList;
|
call Z_clearBuyList;
|
||||||
call Z_clearBuyingList;
|
call Z_clearBuyingList;
|
||||||
Z_BuyableArray = [];
|
Z_BuyableArray = [];
|
||||||
@@ -18,6 +18,7 @@ _counter = 0;
|
|||||||
if (isClass _y) then
|
if (isClass _y) then
|
||||||
{
|
{
|
||||||
_y = configName (_y );
|
_y = configName (_y );
|
||||||
|
|
||||||
_type = getText(missionConfigFile >> "CfgTraderCategory" >> _cat >> _y >> "type");
|
_type = getText(missionConfigFile >> "CfgTraderCategory" >> _cat >> _y >> "type");
|
||||||
_buy = getArray(missionConfigFile >> "CfgTraderCategory" >> _cat >> _y >> "buy");
|
_buy = getArray(missionConfigFile >> "CfgTraderCategory" >> _cat >> _y >> "buy");
|
||||||
_sell = getArray(missionConfigFile >> "CfgTraderCategory" >> _cat >> _y >> "sell");
|
_sell = getArray(missionConfigFile >> "CfgTraderCategory" >> _cat >> _y >> "sell");
|
||||||
@@ -26,6 +27,10 @@ _counter = 0;
|
|||||||
_buyCurrency = "";
|
_buyCurrency = "";
|
||||||
_sellCurrency = "";
|
_sellCurrency = "";
|
||||||
_worth = 0;
|
_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{
|
if(_type == "trade_items")then{
|
||||||
_pic = getText (configFile >> 'CfgMagazines' >> _y >> 'picture');
|
_pic = getText (configFile >> 'CfgMagazines' >> _y >> 'picture');
|
||||||
@@ -53,9 +58,11 @@ _counter = 0;
|
|||||||
_sellCurrency = 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]];
|
Z_BuyableArray set [count(Z_BuyableArray) , [_y,_type,_buy select 0,_text,_pic,_forEachIndex,_sell select 0, _buyCurrency, _sellCurrency, 0,_cat, _worth]];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}forEach _arrayOfTraderCat;
|
}forEach _arrayOfTraderCat;
|
||||||
|
|
||||||
Z_OriginalBuyableArray = [] + Z_BuyableArray;
|
Z_OriginalBuyableArray = [] + Z_BuyableArray;
|
||||||
|
|||||||
Reference in New Issue
Block a user