Files
DayZ-Epoch/SQF/dayz_code/actions/show_dialog.sqf
ebaydayz c2b16f0828 Consolidate DZE_ActionInProgress and r_action_count to one variable
There is no point in having two variables for the same purpose.

It is also pointless to keep an action count tally like r_action_count
was doing, since it is only ever checked for being 0 or 1. Any count
higher or lower than that is irrelevant.

I will make this change in vanilla too.
2016-08-25 15:38:27 -04:00

23 lines
569 B
Plaintext

private ["_trader_data", "_dialog"];
if (dayz_actionInProgress) exitWith {localize "STR_EPOCH_PLAYER_103" call dayz_rollingMessages;};
_trader_data = (_this select 3);
_dialog = createdialog "TraderDialog";
lbClear TraderDialogCatList;
lbClear TraderDialogItemList;
TraderCurrentCatIndex = -1;
TraderItemList = [];
TraderCatList = [];
{
private ["_index", "_x"];
_index = lbAdd [TraderDialogCatList, _x select 0];
TraderCatList set [count TraderCatList, _x select 1];
} count _trader_data;
waitUntil { !dialog };
TraderCurrentCatIndex = -1;
TraderCatList = [];