mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
Merge pull request #970 from CasualTheoryCrafters/master
Extended Tradelogging + fix for Sold Itemname
This commit is contained in:
@@ -84,7 +84,13 @@ if (_qty >= _qty_in) then {
|
|||||||
//["PVDZE_obj_Trade",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
|
//["PVDZE_obj_Trade",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
|
||||||
if (isNil "_obj") then { _obj = "Unknown Vehicle" };
|
if (isNil "_obj") then { _obj = "Unknown Vehicle" };
|
||||||
if (isNil "inTraderCity") then { inTraderCity = "Unknown Trader City" };
|
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";
|
publicVariableServer "PVDZE_obj_Trade";
|
||||||
|
|
||||||
//diag_log format["DEBUG Starting to wait for answer: %1", 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;
|
DZE_ActionInProgress = false;
|
||||||
|
|||||||
@@ -85,7 +85,13 @@ if (_qty >= _qty_in) then {
|
|||||||
//["PVDZE_obj_Trade",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
|
//["PVDZE_obj_Trade",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
|
||||||
if (isNil "_obj") then { _obj = "Unknown Vehicle" };
|
if (isNil "_obj") then { _obj = "Unknown Vehicle" };
|
||||||
if (isNil "inTraderCity") then { inTraderCity = "Unknown Trader City" };
|
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";
|
publicVariableServer "PVDZE_obj_Trade";
|
||||||
|
|
||||||
//diag_log format["DEBUG Starting to wait for answer: %1", PVDZE_obj_Trade];
|
//diag_log format["DEBUG Starting to wait for answer: %1", PVDZE_obj_Trade];
|
||||||
|
|||||||
@@ -93,7 +93,13 @@ if (_qty >= _qty_in) then {
|
|||||||
//["PVDZE_obj_Trade",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
|
//["PVDZE_obj_Trade",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
|
||||||
if (isNil "_obj") then { _obj = "Unknown Vehicle" };
|
if (isNil "_obj") then { _obj = "Unknown Vehicle" };
|
||||||
if (isNil "inTraderCity") then { inTraderCity = "Unknown Trader City" };
|
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";
|
publicVariableServer "PVDZE_obj_Trade";
|
||||||
|
|
||||||
//diag_log format["DEBUG Starting to wait for answer: %1", PVDZE_obj_Trade];
|
//diag_log format["DEBUG Starting to wait for answer: %1", PVDZE_obj_Trade];
|
||||||
|
|||||||
@@ -87,7 +87,13 @@ if (_qty >= _qty_in) then {
|
|||||||
//["PVDZE_obj_Trade",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
|
//["PVDZE_obj_Trade",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
|
||||||
if (isNil "_bag") then { _bag = "Unknown Backpack" };
|
if (isNil "_bag") then { _bag = "Unknown Backpack" };
|
||||||
if (isNil "inTraderCity") then { inTraderCity = "Unknown Trader City" };
|
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";
|
publicVariableServer "PVDZE_obj_Trade";
|
||||||
|
|
||||||
//diag_log format["DEBUG Starting to wait for answer: %1", 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"];
|
cutText [format[(localize "str_epoch_player_184"),_needed,_textPartIn] , "PLAIN DOWN"];
|
||||||
};
|
};
|
||||||
|
|
||||||
DZE_ActionInProgress = false;
|
DZE_ActionInProgress = false;
|
||||||
|
|||||||
@@ -104,7 +104,13 @@ for "_x" from 1 to _total_trades do {
|
|||||||
// Continue with trade.
|
// Continue with trade.
|
||||||
if (isNil "_part_in") then { _part_in = "Unknown Item" };
|
if (isNil "_part_in") then { _part_in = "Unknown Item" };
|
||||||
if (isNil "inTraderCity") then { inTraderCity = "Unknown Trader City" };
|
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";
|
publicVariableServer "PVDZE_obj_Trade";
|
||||||
|
|
||||||
waitUntil {!isNil "dayzTradeResult"};
|
waitUntil {!isNil "dayzTradeResult"};
|
||||||
@@ -258,4 +264,4 @@ if(_total_parts_out >= 1) then {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
DZE_ActionInProgress = false;
|
DZE_ActionInProgress = false;
|
||||||
|
|||||||
@@ -83,7 +83,13 @@ if (_qty >= _qty_in) then {
|
|||||||
//["PVDZE_obj_Trade",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
|
//["PVDZE_obj_Trade",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
|
||||||
if (isNil "_part_out") then { _part_out = "Unknown Weapon/Magazine" };
|
if (isNil "_part_out") then { _part_out = "Unknown Weapon/Magazine" };
|
||||||
if (isNil "inTraderCity") then { inTraderCity = "Unknown Trader City" };
|
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";
|
publicVariableServer "PVDZE_obj_Trade";
|
||||||
|
|
||||||
waitUntil {!isNil "dayzTradeResult"};
|
waitUntil {!isNil "dayzTradeResult"};
|
||||||
@@ -122,4 +128,4 @@ if (_qty >= _qty_in) then {
|
|||||||
cutText [format[(localize "str_epoch_player_184"),_needed,_textPartIn] , "PLAIN DOWN"];
|
cutText [format[(localize "str_epoch_player_184"),_needed,_textPartIn] , "PLAIN DOWN"];
|
||||||
};
|
};
|
||||||
|
|
||||||
DZE_ActionInProgress = false;
|
DZE_ActionInProgress = false;
|
||||||
|
|||||||
@@ -5,12 +5,15 @@ _traderID = _this select 1;
|
|||||||
_buyorsell = _this select 2; //0 > Buy // 1 > Sell
|
_buyorsell = _this select 2; //0 > Buy // 1 > Sell
|
||||||
_classname = _this select 3;
|
_classname = _this select 3;
|
||||||
_traderCity = _this select 4;
|
_traderCity = _this select 4;
|
||||||
|
_currency = _this select 5;
|
||||||
|
_qty = _this select 6;
|
||||||
_clientID = owner _player;
|
_clientID = owner _player;
|
||||||
|
_price = format ["%2x %1",_currency,_qty];
|
||||||
|
|
||||||
if (_buyorsell == 0) then { //Buy
|
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 %5", (name _player), (getPlayerUID _player), _classname, _traderCity, _price];
|
||||||
} else { //SELL
|
} 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 %5",(name _player), (getPlayerUID _player), _classname, _traderCity, _price];
|
||||||
};
|
};
|
||||||
|
|
||||||
//Send request
|
//Send request
|
||||||
@@ -24,4 +27,4 @@ _outcome = _result select 0;
|
|||||||
dayzTradeResult = _outcome;
|
dayzTradeResult = _outcome;
|
||||||
if(!isNull _player) then {
|
if(!isNull _player) then {
|
||||||
_clientID publicVariableClient "dayzTradeResult";
|
_clientID publicVariableClient "dayzTradeResult";
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user