mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-17 17:20:26 +03:00
Add weight to items at traders
If the weight system is active all weights of the items will be displayed on the trader infos. Also update the trading files and replace switch with call and exitwith which is faster.
This commit is contained in:
@@ -8,20 +8,20 @@ private ['_item','_selectedList','_selectedIndex'];
|
||||
_selectedList = _this select 0;
|
||||
_selectedIndex = _this select 1;
|
||||
|
||||
_item = [];
|
||||
_item = [];
|
||||
|
||||
if (_selectedIndex >= 0) then {
|
||||
switch (_selectedList) do {
|
||||
case 'sellable': {
|
||||
call {
|
||||
if (_selectedList == 'sellable') exitwith {
|
||||
_item = Z_SellableArray select _selectedIndex;
|
||||
};
|
||||
case 'selling': {
|
||||
if (_selectedList == 'selling') exitwith {
|
||||
_item = Z_SellArray select _selectedIndex;
|
||||
};
|
||||
case 'buyable': {
|
||||
if (_selectedList == 'buyable') exitwith {
|
||||
_item = Z_BuyableArray select _selectedIndex;
|
||||
};
|
||||
case 'buying': {
|
||||
if (_selectedList == 'buying') exitwith {
|
||||
_item = Z_BuyingArray select _selectedIndex;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user