Files
DayZ-Epoch/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_getItemInfo.sqf
ebaydayz f84140c555 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.
2016-07-27 18:40:03 -04:00

32 lines
746 B
Plaintext

/**
* [_selectedList, _selectedIndex ]call Z_clearBuyingList
*
* Innitiates the item info to be displayed by getting the right item out of the corresponding list based on your sellection.
**/
private ['_item','_selectedList','_selectedIndex'];
_selectedList = _this select 0;
_selectedIndex = _this select 1;
_item = [];
if(_selectedIndex >= 0) then {
switch(_selectedList) do {
case 'sellable': {
_item = Z_SellableArray select _selectedIndex;
};
case 'selling': {
_item = Z_SellArray select _selectedIndex;
};
case 'buyable': {
_item = Z_BuyableArray select _selectedIndex;
};
case 'buying': {
_item = Z_BuyingArray select _selectedIndex;
};
};
};
if( count _item > 0) then {
[_item] call Z_getItemConfig;
};