Give vehUpgraded a default value #1745

@oiad No need to check _vehtrade in this case it will always be true if
_vehUpgraded != ""
This commit is contained in:
ebaydayz
2016-08-19 14:17:13 -04:00
parent 461424ff41
commit f3370cbc4b
2 changed files with 3 additions and 1 deletions

View File

@@ -28,6 +28,7 @@
[NEW] Optional variable to prevent stealing from backpacks by non-friendlies at traders. Set DZE_BackpackAntiTheft = true; in init.sqf @ebaydayz [NEW] Optional variable to prevent stealing from backpacks by non-friendlies at traders. Set DZE_BackpackAntiTheft = true; in init.sqf @ebaydayz
[NEW] Zupa's Advanced Trading v2.1+ is now included as part of the Epoch Code, enabled with DZE_advancedTrading = true; NOT COMPATIBLE WITH DATABASE TRADERS @icomrade @Windmolders [NEW] Zupa's Advanced Trading v2.1+ is now included as part of the Epoch Code, enabled with DZE_advancedTrading = true; NOT COMPATIBLE WITH DATABASE TRADERS @icomrade @Windmolders
[NEW] With config based traders categories can be reused by setting the duplicate=#; value. # is the category number to copy. @ebaydayz [NEW] With config based traders categories can be reused by setting the duplicate=#; value. # is the category number to copy. @ebaydayz
[NEW] With config based traders upgraded vehicles can now be sold for the same price as their original. #1745 @oiad
[NEW] Gems are now treated as variable value currency (Advanced Trading only). Configure gem values using DZE_GemWorthArray =[]; see configVariables.sqf for more info @icomrade [NEW] Gems are now treated as variable value currency (Advanced Trading only). Configure gem values using DZE_GemWorthArray =[]; see configVariables.sqf for more info @icomrade
[NEW] Gem rarity is now configurable for mining using DZE_GemOccurance =[]; See configVariables.sqf for more info @icomrade [NEW] Gem rarity is now configurable for mining using DZE_GemOccurance =[]; See configVariables.sqf for more info @icomrade
[NEW] A Plot For Life v2.5 by RimBlock is now included and enabled by default with variable DZE_permanentPlot, see configVariables.sqf @RimBlock @icomrade [NEW] A Plot For Life v2.5 by RimBlock is now included and enabled by default with variable DZE_permanentPlot, see configVariables.sqf @RimBlock @icomrade

View File

@@ -16,6 +16,7 @@ _mags = _this select 1;
_extraText = _this select 2; _extraText = _this select 2;
_bags = _this select 3; _bags = _this select 3;
_vehTrade = false; _vehTrade = false;
_vehUpgraded = "";
if (false call Z_checkCloseVehicle) then { if (false call Z_checkCloseVehicle) then {
_vehUpgraded = getText (configFile >> 'CfgVehicles' >> typeOf (Z_vehicle) >> 'original'); _vehUpgraded = getText (configFile >> 'CfgVehicles' >> typeOf (Z_vehicle) >> 'original');
@@ -55,7 +56,7 @@ _totalPrice = 0;
if (isNumber (missionConfigFile >> "CfgTraderCategory" >> _cat >> "duplicate")) then { if (isNumber (missionConfigFile >> "CfgTraderCategory" >> _cat >> "duplicate")) then {
_cat = format["Category_%1",getNumber (missionConfigFile >> "CfgTraderCategory" >> _cat >> "duplicate")]; _cat = format["Category_%1",getNumber (missionConfigFile >> "CfgTraderCategory" >> _cat >> "duplicate")];
}; };
if (_vehUpgraded != "" && _vehTrade && _y == (typeOf Z_vehicle)) then { _y = _vehUpgraded; }; if (_vehUpgraded != "" && _y == (typeOf Z_vehicle)) then { _y = _vehUpgraded; };
_exists = isClass(missionConfigFile >> "CfgTraderCategory" >> _cat >> _y); _exists = isClass(missionConfigFile >> "CfgTraderCategory" >> _cat >> _y);
if (_exists) exitWith { if (_exists) exitWith {
_pic = ""; _pic = "";