mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 12:12:34 +03:00
Update Advanced Trading with category reuse support
Tested and working ok.
Updating with change from:
03b8c38c6a
This commit is contained in:
@@ -8,6 +8,10 @@ _counter = 0;
|
||||
{
|
||||
_cat = format["Category_%1",(_arrayOfTraderCat select _forEachIndex select 1)];
|
||||
_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;
|
||||
|
||||
@@ -48,6 +48,9 @@ if(_total > 0)then{
|
||||
{
|
||||
private ["_cat","_excists","_pic","_text","_type","_sell","_buy","_buyCurrency","_sellCurrency","_worth"];
|
||||
_cat = format["Category_%1",(_arrayOfTraderCat select _forEachIndex select 1)];
|
||||
if (isNumber (missionConfigFile >> "CfgTraderCategory" >> _cat >> "duplicate")) then {
|
||||
_cat = format["Category_%1",getNumber (missionConfigFile >> "CfgTraderCategory" >> _cat >> "duplicate")];
|
||||
};
|
||||
_excists = isClass(missionConfigFile >> "CfgTraderCategory" >> _cat >> _y );
|
||||
if(_excists)exitWith{
|
||||
_pic = "";
|
||||
|
||||
Reference in New Issue
Block a user