Consolidate duplicate sell distance variables

This commit is contained in:
ebaydayz
2016-09-12 14:14:38 -04:00
parent 2bb5c5942c
commit 29c16dc59f
10 changed files with 20 additions and 105 deletions

View File

@@ -24,12 +24,7 @@ _bos = 0;
if(_buy_o_sell == "buy") then {
_qty = {_x == _part_in} count magazines player;
} else {
if (_part_in isKindOf "Air") then {
_obj = nearestObjects [(getPosATL player), [_part_in], dayz_sellDistance_air];
} else {
_obj = nearestObjects [(getPosATL player), [_part_in], dayz_sellDistance_vehicle];
};
_obj = nearestObjects [(getPosATL player), [_part_in], Z_VehicleDistance];
_qty = count _obj;
_bos = 1;
};
@@ -80,11 +75,7 @@ if (_qty >= _qty_in) then {
if(_buy_o_sell == "buy") then {
_qty = {_x == _part_in} count magazines player;
} else {
if (_part_in isKindOf "AIR") then {
_obj = nearestObjects [(getPosATL player), [_part_in], dayz_sellDistance_air];
} else {
_obj = nearestObjects [(getPosATL player), [_part_in], dayz_sellDistance_vehicle];
};
_obj = nearestObjects [(getPosATL player), [_part_in], Z_VehicleDistance];
_qty = count _obj;
};