mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-21 23:50:48 +03:00
Fix can't sell satchels with Adv. Trade
Some items (like PipeBomb) are a class in both CfgMagazines and CfgWeapons. BIS_fnc_invRemove uses weapon first, so that is why the magazine was not being removed. Using config instead of string avoids this problem.
This commit is contained in:
@@ -154,7 +154,11 @@ if(_index > -1)then{
|
|||||||
_localResult = if (_bag != (unitBackpack player)) then {1} else {0};
|
_localResult = if (_bag != (unitBackpack player)) then {1} else {0};
|
||||||
if (_localResult == 1) then {_bagTraded = true;};
|
if (_localResult == 1) then {_bagTraded = true;};
|
||||||
} else {
|
} else {
|
||||||
_localResult = [player,(_x select 0),1] call BIS_fnc_invRemove;
|
_name = _x select 0;
|
||||||
|
_type = _x select 1;
|
||||||
|
if (_type == "trade_items") then {_name = configFile >> "CfgMagazines" >> _name;};
|
||||||
|
if (_type == "trade_weapons") then {_name = configFile >> "CfgWeapons" >> _name;};
|
||||||
|
_localResult = [player,_name,1] call BIS_fnc_invRemove; // Use config for BIS_fnc_invRemove
|
||||||
if(_localResult != 1)then{
|
if(_localResult != 1)then{
|
||||||
if(_x select 1 == "trade_items")then{
|
if(_x select 1 == "trade_items")then{
|
||||||
_mA set [count(_mA),0];
|
_mA set [count(_mA),0];
|
||||||
|
|||||||
Reference in New Issue
Block a user