From a46cec00360b6a2287ece79e12d75fe8568e3b22 Mon Sep 17 00:00:00 2001 From: "[VB]AWOL" Date: Tue, 26 Nov 2013 22:25:53 -0600 Subject: [PATCH] fixes to trading --- SQF/dayz_code/actions/trade_any_boat.sqf | 2 +- SQF/dayz_code/actions/trade_any_vehicle.sqf | 2 +- SQF/dayz_code/actions/trade_backpacks.sqf | 2 +- SQF/dayz_code/actions/trade_items.sqf | 2 +- SQF/dayz_code/actions/trade_weapons.sqf | 2 +- SQF/dayz_code/compile/player_traderMenu.sqf | 7 +++---- 6 files changed, 8 insertions(+), 9 deletions(-) diff --git a/SQF/dayz_code/actions/trade_any_boat.sqf b/SQF/dayz_code/actions/trade_any_boat.sqf index 371fff43c..beda0a90f 100644 --- a/SQF/dayz_code/actions/trade_any_boat.sqf +++ b/SQF/dayz_code/actions/trade_any_boat.sqf @@ -9,7 +9,7 @@ TradeInprogress = true; // [part_out,part_in, qty_out, qty_in, loc]; -_activatingPlayer = getPlayerUID player; +_activatingPlayer = player; _part_out = (_this select 3) select 0; _part_in = (_this select 3) select 1; diff --git a/SQF/dayz_code/actions/trade_any_vehicle.sqf b/SQF/dayz_code/actions/trade_any_vehicle.sqf index d5e71b4e4..360fc6862 100644 --- a/SQF/dayz_code/actions/trade_any_vehicle.sqf +++ b/SQF/dayz_code/actions/trade_any_vehicle.sqf @@ -9,7 +9,7 @@ TradeInprogress = true; // [part_out,part_in, qty_out, qty_in, loc]; -_activatingPlayer = getPlayerUID player; +_activatingPlayer = player; _part_out = (_this select 3) select 0; _part_in = (_this select 3) select 1; diff --git a/SQF/dayz_code/actions/trade_backpacks.sqf b/SQF/dayz_code/actions/trade_backpacks.sqf index 31dc7b7a0..cb99cad15 100644 --- a/SQF/dayz_code/actions/trade_backpacks.sqf +++ b/SQF/dayz_code/actions/trade_backpacks.sqf @@ -4,7 +4,7 @@ private ["_part_out","_part_in","_qty_out","_qty_in","_qty","_bos","_bag","_clas if(TradeInprogress) exitWith { cutText [(localize "str_epoch_player_103") , "PLAIN DOWN"]; }; TradeInprogress = true; -_activatingPlayer = getPlayerUID player; +_activatingPlayer = player; _part_out = (_this select 3) select 0; _part_in = (_this select 3) select 1; diff --git a/SQF/dayz_code/actions/trade_items.sqf b/SQF/dayz_code/actions/trade_items.sqf index 5e88e16be..cef3e33af 100644 --- a/SQF/dayz_code/actions/trade_items.sqf +++ b/SQF/dayz_code/actions/trade_items.sqf @@ -6,7 +6,7 @@ TradeInprogress = true; _total_parts_out = 0; -_activatingPlayer = getPlayerUID player; +_activatingPlayer = player; _part_out = (_this select 3) select 0; _part_in = (_this select 3) select 1; diff --git a/SQF/dayz_code/actions/trade_weapons.sqf b/SQF/dayz_code/actions/trade_weapons.sqf index e0b6e08b8..f7bcbf15c 100644 --- a/SQF/dayz_code/actions/trade_weapons.sqf +++ b/SQF/dayz_code/actions/trade_weapons.sqf @@ -4,7 +4,7 @@ private ["_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_trad if(TradeInprogress) exitWith { cutText [(localize "str_epoch_player_103") , "PLAIN DOWN"]; }; TradeInprogress = true; -_activatingPlayer = getPlayerUID player; +_activatingPlayer = player; _part_out = (_this select 3) select 0; _part_in = (_this select 3) select 1; diff --git a/SQF/dayz_code/compile/player_traderMenu.sqf b/SQF/dayz_code/compile/player_traderMenu.sqf index 5c89fe6c4..5e412dabd 100644 --- a/SQF/dayz_code/compile/player_traderMenu.sqf +++ b/SQF/dayz_code/compile/player_traderMenu.sqf @@ -113,15 +113,14 @@ TraderDialogLoadItemList = { }; } else { if (isClass(configFile >> "CfgVehicles" >> _name)) then { - _objclass = configFile >> "CfgVehicles" >> _name; _distance = dayz_sellDistance_vehicle; - if (_objclass isKindOf "AIR") then { + if (_name isKindOf "Air") then { _distance = dayz_sellDistance_air; }; - if (_objclass isKindOf "SHIP") then { + if (_name isKindOf "Ship") then { _distance = dayz_sellDistance_boat; }; - _count = {(typeOf _x) == _name} count (nearestObjects [player, [_objclass], _distance]); + _count = {(typeOf _x) == _name} count (nearestObjects [player, [_name], _distance]); }; }; };