mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-21 10:56:29 +03:00
Advanced trading fixes/modifications (#1698)
* Advanced trading fixes/modifcations This adds combine currency option to the Advanced trading screen since @Airwaves man noticed it didn't have a way of doing it. Updated stringtables with correct "paid" spelling and differing text for buying/selling. This also addds proper currency checking/reporting for the log system that has been introduced, it's untidy but it works, instead of getting "user bought x for 1000 currency" in a non coins server, it will convert it to the proper 1 brief 5 10oz gold etc system (uses a new function z_calcDefaultCurrencyNoImg) This also adds a check to see if the buy list is empty (as per the selling list) and returns text to the user informing them. Re-arranged buy and sell so buy is on top of sell, it's a bit easier to read then. * Advanced trading logging change This was missing from my previous commit, this changes the server_tradeobject to check if it's being passed a number (single currency) or text (my logging currency changes) * Advanced trading rework Fixes all problems @ebaydayz
This commit is contained in:
@@ -19,14 +19,15 @@ if (count _this > 7) then {
|
||||
};
|
||||
|
||||
_clientID = owner _player;
|
||||
_price = format ["%1x%2",_price,_currency];
|
||||
|
||||
if (typeName _price == "SCALAR") then { _price = format ["%1x%2",_price,_currency]; } else { _price = format ["%1",_price]; };
|
||||
_name = if (alive _player) then { name _player; } else { "Dead Player"; };
|
||||
_PUID = [_player] call FNC_GetPlayerUID;
|
||||
|
||||
if (_buyorsell == 0) then { //Buy
|
||||
diag_log format["%8: %9: %1 (%2) bought %6 x %3 into %7 at %4 for %5", _name, _PUID, _classname, _traderCity, _price, _quantity,_container,localize "STR_EPOCH_PLAYER_289",localize "STR_EPOCH_PLAYER"];
|
||||
diag_log format["%8: %9: %1 (%2) bought %6 x %3 into %7 at %4 for %5", _name, _PUID, _classname, _traderCity, _price, _quantity,_container,localize "STR_EPOCH_PLAYER_289",localize "STR_EPOCH_PLAYER"];
|
||||
} else { //SELL
|
||||
diag_log format["%8: %9: %1 (%2) sold %6 x %3 from %7 at %4 for %5",_name, _PUID, _classname, _traderCity, _price, _quantity,_container,localize "STR_EPOCH_PLAYER_289",localize "STR_EPOCH_PLAYER"];
|
||||
diag_log format["%8: %9: %1 (%2) sold %6 x %3 from %7 at %4 for %5",_name, _PUID, _classname, _traderCity, _price, _quantity,_container,localize "STR_EPOCH_PLAYER_289",localize "STR_EPOCH_PLAYER"];
|
||||
};
|
||||
|
||||
if (DZE_ConfigTrader) then {
|
||||
@@ -46,4 +47,4 @@ if (_return) then {
|
||||
if(!isNull _player) then {
|
||||
_clientID publicVariableClient "dayzTradeResult";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user