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

@@ -37,6 +37,7 @@
[FIXED] Generator inventory not saving #1831 @icomrade @schwanzkopfhegel
[FIXED] Filling fuel barrels takes the correct amount from fuel tanks now (210 instead of 40 litres). #1834 @schwanzkopfhegel @oiad
[FIXED] Base objects duplicating when using "take ownership" on plot pole. #1811 @BNG-Lance @Clanwarfare
[FIXED] Unable to sell some launchers like Javelin and Stinger which have the same classname for ammo and weapon. #1844 @ndavalos
[NOTE] The fixes below are included in the 1.0.6 Build C server package released December 29th, 2016 (http://dayzepoch.com/a2dayzepoch.php)
[FIXED] Hive child 309 errors that resulted in broken saving of newly built storage object inventory. @icomrade

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"};