From e5f8314831ac1056f013e33280461918a30d1db6 Mon Sep 17 00:00:00 2001 From: "ctc.Sebi" Date: Tue, 7 Jan 2014 16:33:37 +0100 Subject: [PATCH 1/8] Update trade_any_bicycle.sqf Extended logging of trades --- SQF/dayz_code/actions/trade_any_bicycle.sqf | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/SQF/dayz_code/actions/trade_any_bicycle.sqf b/SQF/dayz_code/actions/trade_any_bicycle.sqf index 4beb9de0e..8fc8a0916 100644 --- a/SQF/dayz_code/actions/trade_any_bicycle.sqf +++ b/SQF/dayz_code/actions/trade_any_bicycle.sqf @@ -84,7 +84,13 @@ if (_qty >= _qty_in) then { //["PVDZE_obj_Trade",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure; if (isNil "_obj") then { _obj = "Unknown Vehicle" }; if (isNil "inTraderCity") then { inTraderCity = "Unknown Trader City" }; - PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_obj,inTraderCity]; + if(_bos == 1) then { + // Selling + PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_part_in,inTraderCity,_part_out,_qty_out]; + } else { + // Buying + PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_part_out,inTraderCity,_part_in,_qty_in]; + }; publicVariableServer "PVDZE_obj_Trade"; //diag_log format["DEBUG Starting to wait for answer: %1", PVDZE_obj_Trade]; @@ -198,4 +204,4 @@ if (_qty >= _qty_in) then { }; }; -DZE_ActionInProgress = false; \ No newline at end of file +DZE_ActionInProgress = false; From ce1624438d790c41aa3fce2748bc98553eeacc8a Mon Sep 17 00:00:00 2001 From: "ctc.Sebi" Date: Tue, 7 Jan 2014 16:34:03 +0100 Subject: [PATCH 2/8] Update trade_any_boat.sqf --- SQF/dayz_code/actions/trade_any_boat.sqf | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/SQF/dayz_code/actions/trade_any_boat.sqf b/SQF/dayz_code/actions/trade_any_boat.sqf index fc001d57e..ccc7570f5 100644 --- a/SQF/dayz_code/actions/trade_any_boat.sqf +++ b/SQF/dayz_code/actions/trade_any_boat.sqf @@ -85,7 +85,13 @@ if (_qty >= _qty_in) then { //["PVDZE_obj_Trade",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure; if (isNil "_obj") then { _obj = "Unknown Vehicle" }; if (isNil "inTraderCity") then { inTraderCity = "Unknown Trader City" }; - PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_obj,inTraderCity]; + if(_bos == 1) then { + // Selling + PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_part_in,inTraderCity,_part_out,_qty_out]; + } else { + // Buying + PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_part_out,inTraderCity,_part_in,_qty_in]; + }; publicVariableServer "PVDZE_obj_Trade"; //diag_log format["DEBUG Starting to wait for answer: %1", PVDZE_obj_Trade]; From f521a241c8496dc8fba4ad8ee35df39071596a3b Mon Sep 17 00:00:00 2001 From: "ctc.Sebi" Date: Tue, 7 Jan 2014 16:34:31 +0100 Subject: [PATCH 3/8] Update trade_any_vehicle.sqf --- SQF/dayz_code/actions/trade_any_vehicle.sqf | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/SQF/dayz_code/actions/trade_any_vehicle.sqf b/SQF/dayz_code/actions/trade_any_vehicle.sqf index 55ff3e8d8..9842c51e2 100644 --- a/SQF/dayz_code/actions/trade_any_vehicle.sqf +++ b/SQF/dayz_code/actions/trade_any_vehicle.sqf @@ -93,7 +93,13 @@ if (_qty >= _qty_in) then { //["PVDZE_obj_Trade",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure; if (isNil "_obj") then { _obj = "Unknown Vehicle" }; if (isNil "inTraderCity") then { inTraderCity = "Unknown Trader City" }; - PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_obj,inTraderCity]; + if(_bos == 1) then { + // Selling + PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_part_in,inTraderCity,_part_out,_qty_out]; + } else { + // Buying + PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_part_out,inTraderCity,_part_in,_qty_in]; + }; publicVariableServer "PVDZE_obj_Trade"; //diag_log format["DEBUG Starting to wait for answer: %1", PVDZE_obj_Trade]; From 9a88a4ad6c17958a2a555274a8f919e248c61bfb Mon Sep 17 00:00:00 2001 From: "ctc.Sebi" Date: Tue, 7 Jan 2014 16:34:53 +0100 Subject: [PATCH 4/8] Update trade_backpacks.sqf --- SQF/dayz_code/actions/trade_backpacks.sqf | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/SQF/dayz_code/actions/trade_backpacks.sqf b/SQF/dayz_code/actions/trade_backpacks.sqf index 6f9b74167..5d1252ac2 100644 --- a/SQF/dayz_code/actions/trade_backpacks.sqf +++ b/SQF/dayz_code/actions/trade_backpacks.sqf @@ -87,7 +87,13 @@ if (_qty >= _qty_in) then { //["PVDZE_obj_Trade",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure; if (isNil "_bag") then { _bag = "Unknown Backpack" }; if (isNil "inTraderCity") then { inTraderCity = "Unknown Trader City" }; - PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_bag,inTraderCity]; + if(_bos == 1) then { + // Selling + PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_part_in,inTraderCity,_part_out,_qty_out]; + } else { + // Buying + PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_part_out,inTraderCity,_part_in,_qty_in]; + }; publicVariableServer "PVDZE_obj_Trade"; //diag_log format["DEBUG Starting to wait for answer: %1", PVDZE_obj_Trade]; @@ -132,4 +138,4 @@ if (_qty >= _qty_in) then { cutText [format[(localize "str_epoch_player_184"),_needed,_textPartIn] , "PLAIN DOWN"]; }; -DZE_ActionInProgress = false; \ No newline at end of file +DZE_ActionInProgress = false; From 152054da946e2ac70a5e76150e545a935544e4af Mon Sep 17 00:00:00 2001 From: "ctc.Sebi" Date: Tue, 7 Jan 2014 16:35:28 +0100 Subject: [PATCH 5/8] Update trade_items.sqf --- SQF/dayz_code/actions/trade_items.sqf | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/SQF/dayz_code/actions/trade_items.sqf b/SQF/dayz_code/actions/trade_items.sqf index 215a6c56c..9d263231b 100644 --- a/SQF/dayz_code/actions/trade_items.sqf +++ b/SQF/dayz_code/actions/trade_items.sqf @@ -104,7 +104,13 @@ for "_x" from 1 to _total_trades do { // Continue with trade. if (isNil "_part_in") then { _part_in = "Unknown Item" }; if (isNil "inTraderCity") then { inTraderCity = "Unknown Trader City" }; - PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_part_in,inTraderCity]; + if(_bos == 1) then { + // Selling + PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_part_in,inTraderCity,_part_out,_qty_out]; + } else { + // Buying + PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_part_out,inTraderCity,_part_in,_qty_in]; + }; publicVariableServer "PVDZE_obj_Trade"; waitUntil {!isNil "dayzTradeResult"}; @@ -258,4 +264,4 @@ if(_total_parts_out >= 1) then { }; }; -DZE_ActionInProgress = false; \ No newline at end of file +DZE_ActionInProgress = false; From a1903976180196fc8f684d8bc9967a39fa8b59d4 Mon Sep 17 00:00:00 2001 From: "ctc.Sebi" Date: Tue, 7 Jan 2014 16:35:46 +0100 Subject: [PATCH 6/8] Update trade_weapons.sqf --- SQF/dayz_code/actions/trade_weapons.sqf | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/SQF/dayz_code/actions/trade_weapons.sqf b/SQF/dayz_code/actions/trade_weapons.sqf index 0b99f7d7f..b165646fe 100644 --- a/SQF/dayz_code/actions/trade_weapons.sqf +++ b/SQF/dayz_code/actions/trade_weapons.sqf @@ -83,7 +83,13 @@ if (_qty >= _qty_in) then { //["PVDZE_obj_Trade",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure; if (isNil "_part_out") then { _part_out = "Unknown Weapon/Magazine" }; if (isNil "inTraderCity") then { inTraderCity = "Unknown Trader City" }; - PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_part_out,inTraderCity]; + if(_bos == 1) then { + // Selling + PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_part_in,inTraderCity,_part_out,_qty_out]; + } else { + // Buying + PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_part_out,inTraderCity,_part_in,_qty_in]; + }; publicVariableServer "PVDZE_obj_Trade"; waitUntil {!isNil "dayzTradeResult"}; @@ -122,4 +128,4 @@ if (_qty >= _qty_in) then { cutText [format[(localize "str_epoch_player_184"),_needed,_textPartIn] , "PLAIN DOWN"]; }; -DZE_ActionInProgress = false; \ No newline at end of file +DZE_ActionInProgress = false; From 4e1960f46ca11b165508d16a496e7ee5cf612d39 Mon Sep 17 00:00:00 2001 From: "ctc.Sebi" Date: Tue, 7 Jan 2014 16:38:19 +0100 Subject: [PATCH 7/8] Update server_tradeObject.sqf Extended trade-logging (incl. price) --- SQF/dayz_server/compile/server_tradeObject.sqf | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/SQF/dayz_server/compile/server_tradeObject.sqf b/SQF/dayz_server/compile/server_tradeObject.sqf index a4d61900d..0df058aba 100644 --- a/SQF/dayz_server/compile/server_tradeObject.sqf +++ b/SQF/dayz_server/compile/server_tradeObject.sqf @@ -5,12 +5,15 @@ _traderID = _this select 1; _buyorsell = _this select 2; //0 > Buy // 1 > Sell _classname = _this select 3; _traderCity = _this select 4; +_currency = _this select 5; +_qty = _this select 6; _clientID = owner _player; +_price = format ["%2x %1",_currency,_qty]; if (_buyorsell == 0) then { //Buy -diag_log format["EPOCH SERVERTRADE: Player: %1 (%2) bought a %3 in/at %4", (name _player), (getPlayerUID _player), _classname, _traderCity]; +diag_log format["EPOCH SERVERTRADE: Player: %1 (%2) bought a %3 in/at %4 for %5x", (name _player), (getPlayerUID _player), _classname, _traderCity, _price]; } else { //SELL -diag_log format["EPOCH SERVERTRADE: Player: %1 (%2) sold a %3 in/at %4",(name _player), (getPlayerUID _player), _classname, _traderCity]; +diag_log format["EPOCH SERVERTRADE: Player: %1 (%2) sold a %3 in/at %4 for %5x",(name _player), (getPlayerUID _player), _classname, _traderCity, _price]; }; //Send request @@ -24,4 +27,4 @@ _outcome = _result select 0; dayzTradeResult = _outcome; if(!isNull _player) then { _clientID publicVariableClient "dayzTradeResult"; -}; \ No newline at end of file +}; From 481369154ad127de03c8fb88bdc7feab44f12460 Mon Sep 17 00:00:00 2001 From: "ctc.Sebi" Date: Tue, 7 Jan 2014 16:39:53 +0100 Subject: [PATCH 8/8] Update server_tradeObject.sqf --- SQF/dayz_server/compile/server_tradeObject.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SQF/dayz_server/compile/server_tradeObject.sqf b/SQF/dayz_server/compile/server_tradeObject.sqf index 0df058aba..7a93c977c 100644 --- a/SQF/dayz_server/compile/server_tradeObject.sqf +++ b/SQF/dayz_server/compile/server_tradeObject.sqf @@ -11,9 +11,9 @@ _clientID = owner _player; _price = format ["%2x %1",_currency,_qty]; if (_buyorsell == 0) then { //Buy -diag_log format["EPOCH SERVERTRADE: Player: %1 (%2) bought a %3 in/at %4 for %5x", (name _player), (getPlayerUID _player), _classname, _traderCity, _price]; +diag_log format["EPOCH SERVERTRADE: Player: %1 (%2) bought a %3 in/at %4 for %5", (name _player), (getPlayerUID _player), _classname, _traderCity, _price]; } else { //SELL -diag_log format["EPOCH SERVERTRADE: Player: %1 (%2) sold a %3 in/at %4 for %5x",(name _player), (getPlayerUID _player), _classname, _traderCity, _price]; +diag_log format["EPOCH SERVERTRADE: Player: %1 (%2) sold a %3 in/at %4 for %5",(name _player), (getPlayerUID _player), _classname, _traderCity, _price]; }; //Send request