Fix selling of Javelin, Stinger and some other items

Fixes #1844
This commit is contained in:
ebaydayz
2016-12-31 17:14:08 -05:00
parent 79bbc2c5a4
commit 4fa36dfd94
2 changed files with 3 additions and 0 deletions

View File

@@ -67,6 +67,8 @@ _totalPrice = 0;
_pic = "";
_text = "";
_type = getText(missionConfigFile >> "CfgTraderCategory" >> _cat >> _y >> "type");
// Make sure type matches for items that have the same weapon and magazine classname (i.e. PipeBomb, Mine, Javelin, etc.)
if ((_type == "trade_items" && !(_y in _mags)) or (_type == "trade_weapons" && !(_y in _weaps))) exitWith {};
_sell = getArray(missionConfigFile >> "CfgTraderCategory" >> _cat >> _y >> "sell");
_buy = getArray(missionConfigFile >> "CfgTraderCategory" >> _cat >> _y >> "buy");
if (_swap) then {_y = "ItemBloodbag"};