From c5abeed9f7564c0402986f4043e9a73c07f7b95b Mon Sep 17 00:00:00 2001 From: He-Man Date: Thu, 12 Apr 2018 21:00:24 +0200 Subject: [PATCH] Add SecondaryWeapon to TraderArray (untested !!!) --- .../epoch_code/compile/traders/EPOCH_startNPCTraderMenu.sqf | 3 +++ Sources/epoch_code/compile/traders/EPOCH_startNpcTrade.sqf | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Sources/epoch_code/compile/traders/EPOCH_startNPCTraderMenu.sqf b/Sources/epoch_code/compile/traders/EPOCH_startNPCTraderMenu.sqf index a9b0d110..008eec03 100644 --- a/Sources/epoch_code/compile/traders/EPOCH_startNPCTraderMenu.sqf +++ b/Sources/epoch_code/compile/traders/EPOCH_startNPCTraderMenu.sqf @@ -25,6 +25,9 @@ if (alive _target) then { if (primaryWeapon player != "") then { EPOCH_NpcTradePlayerItems pushback primaryWeapon player; }; + if (secondaryWeapon player != "") then { + EPOCH_NpcTradePlayerItems pushback secondaryWeapon player; + }; if (count backpackItems player == 0 && count backpackmagazines player == 0 && backpack player != "") then { EPOCH_NpcTradePlayerItems pushback backpack player; }; diff --git a/Sources/epoch_code/compile/traders/EPOCH_startNpcTrade.sqf b/Sources/epoch_code/compile/traders/EPOCH_startNpcTrade.sqf index fd930487..10e286e5 100644 --- a/Sources/epoch_code/compile/traders/EPOCH_startNpcTrade.sqf +++ b/Sources/epoch_code/compile/traders/EPOCH_startNpcTrade.sqf @@ -45,7 +45,7 @@ if (alive _this) then { _added = true; } else { - if (_item == primaryweapon player) then { + if (_item in [primaryweapon player, secondaryweapon player]) then { player removeweapon _item; _arrayIn pushBack [_item,_rounds]; _added = true;