From 2abcf105b5637e22645796567fbd1fe67de8de84 Mon Sep 17 00:00:00 2001 From: He-Man Date: Fri, 30 Mar 2018 05:09:27 +0200 Subject: [PATCH] Removed Trader Limits - handled with new vars Have to be tested!!!! --- .../epoch_code/compile/traders/EPOCH_npcTraderAdd.sqf | 5 ----- .../compile/epoch_traders/EPOCH_server_loadTraders.sqf | 9 +-------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/Sources/epoch_code/compile/traders/EPOCH_npcTraderAdd.sqf b/Sources/epoch_code/compile/traders/EPOCH_npcTraderAdd.sqf index 79254c54..9ca89250 100644 --- a/Sources/epoch_code/compile/traders/EPOCH_npcTraderAdd.sqf +++ b/Sources/epoch_code/compile/traders/EPOCH_npcTraderAdd.sqf @@ -57,11 +57,6 @@ if !(isNull EPOCH_lastNPCtradeTarget) then { }; }; }; - _limit = ["CfgTraderLimits", _uiItem, 100] call EPOCH_fnc_returnConfigEntryV2; - if (_itemQty >= _limit) then{ - _stockLimit = true; - _allowAdd = false; - }; }; if (_uiItem isKindOf "Air" || _uiItem isKindOf "Ship" || _uiItem isKindOf "LandVehicle" || _uiItem isKindOf "Tank") then { _sizeOut = lbSize _PlayerItemsOutBox; diff --git a/Sources/epoch_server/compile/epoch_traders/EPOCH_server_loadTraders.sqf b/Sources/epoch_server/compile/epoch_traders/EPOCH_server_loadTraders.sqf index 989d934f..22fd3fdd 100644 --- a/Sources/epoch_server/compile/epoch_traders/EPOCH_server_loadTraders.sqf +++ b/Sources/epoch_server/compile/epoch_traders/EPOCH_server_loadTraders.sqf @@ -53,15 +53,13 @@ _TraderItemsClean = { for "_k" from 1 to (count (_arr select 0)) do { _delete = false; _item = _arr select 0 select _idx; - _limit = ["CfgTraderLimits", _item, 100] call EPOCH_fnc_returnConfigEntryV2; _currentStock = (_arr select 1) param[_idx, 0]; if (_currentStock >= (_TraderItemCountPerItem select 0)) then { _currentStock = _TraderItemCountPerItem select 1; (_arr select 1) set [_idx,_currentStock]; _arrchanged = true; }; - if (_limit == 0 || _currentStock == 0) then { -// diag_log format ["EPOCH_DEBUG: TraderSlot: %1 | Removed %2 from Trader | _limit: %3 | _currentStock: %4",_i,str _item, _limit,_currentStock]; + if (_currentStock == 0) then { _arrchanged = true; _delete = true; } @@ -72,11 +70,6 @@ _TraderItemsClean = { _delete = true; } else { - if (_currentStock > _limit) then { - _arrchanged = true; - (_arr select 1) set [_idx,_limit]; - _currentStock = _limit; - }; if (_item isKindOf "Air" || _item isKindOf "Ship" || _item isKindOf "LandVehicle" || _item isKindOf "Tank") then { _newstock = 0; for "_k" from 1 to _currentStock do {