From 92ee58900c5aeba1e6df5332b1e427229a38034f Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Tue, 17 Jan 2017 14:39:31 -0500 Subject: [PATCH] Fix trader menu server RPT logs partially localized on client --- CHANGE LOG 1.0.6.1.txt | 2 +- .../functions/z_at_calcCurrency.sqf | 17 +++++++++-------- .../AdvancedTrading/functions/z_at_logTrade.sqf | 2 +- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/CHANGE LOG 1.0.6.1.txt b/CHANGE LOG 1.0.6.1.txt index 0e604431b..19861433b 100644 --- a/CHANGE LOG 1.0.6.1.txt +++ b/CHANGE LOG 1.0.6.1.txt @@ -58,7 +58,7 @@ [FIXED] Unconscious locked input when running #1860 @icomrade @DeVloek [FIXED] Running corpses when the dead player has no primary weapon @icomrade [FIXED] "AI" text localized on wrong client in death messages #1867 @LunaCB -[FIXED] Container ("Gear/Backpack/Vehicle") text localized on client for trader menu server RPT logs @oiad +[FIXED] Trader menu server RPT logs partially localized on clients @oiad [FIXED] Group icons will not show for units inside the player's vehicle anymore (helis, large planes, etc.). #1865 @schwanzkopfhegel [FIXED] Lighting fires and building fireplaces not working on platforms raised over the sea #1866 @schwanzkopfhegel [FIXED] Bandit1_DZ and Bandit2_DZ were the same. Bandit1_DZ is back to the normal non-camo skin now. #1874 @DeVloek diff --git a/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_calcCurrency.sqf b/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_calcCurrency.sqf index 3475f164d..7fbec6c1e 100644 --- a/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_calcCurrency.sqf +++ b/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_calcCurrency.sqf @@ -1,8 +1,9 @@ -private ["_GemTotal","_GemTotal2","_ItemAmethyst","_ItemCitrine","_ItemEmerald","_ItemObsidian","_ItemRuby","_ItemSapphire","_ItemTopaz","_array","_briefcase_100oz","_fontSize","_gem","_gold_10oz","_gold_10oz_a","_gold_10oz_b","_gold_1oz","_gold_1oz_a","_gold_1oz_b","_noIMG","_pic","_silver_10oz","_silver_10oz_a","_silver_10oz_b","_silver_1oz","_silver_1oz_a","_silver_1oz_b","_string","_total","_value"]; +private ["_GemTotal","_GemTotal2","_ItemAmethyst","_ItemCitrine","_ItemEmerald","_ItemObsidian","_ItemRuby","_ItemSapphire","_ItemTopaz","_array","_briefcase_100oz","_fontSize","_gem","_gold_10oz","_gold_10oz_a","_gold_10oz_b","_gold_1oz","_gold_1oz_a","_gold_1oz_b","_noIMG","_pic","_silver_10oz","_silver_10oz_a","_silver_10oz_b","_silver_1oz","_silver_1oz_a","_silver_1oz_b","_string","_total","_value","_localize"]; _total = _this select 0; _noIMG = _this select 1; _fontSize = if (count _this > 2) then {_this select 2} else {1}; +_localize = count _this < 4; //Do not localize for server RPT log _array = []; _string = ""; @@ -94,7 +95,7 @@ _silver_1oz = (_silver_1oz_a - _silver_1oz_b); { //sort gems so they display on total price in order of descending worth if (!isNil {call compile format["_%1",_x]} && {(call compile format["_%1",_x]) > 0}) then { if (_noIMG) then { - _pic = getText (configFile >> 'CfgMagazines' >> _x >> 'displayName'); + _pic = if (_localize) then {getText (configFile >> 'CfgMagazines' >> _x >> 'displayName')} else {_x}; _array set [count _array, format["%1 %2",(call compile format["_%1",_x]),_pic]]; } else { _pic = getText (configFile >> 'CfgMagazines' >> _x >> 'picture'); @@ -105,11 +106,11 @@ _silver_1oz = (_silver_1oz_a - _silver_1oz_b); if (_noIMG) then { if (_briefcase_100oz >= 2) then { - _array set [count _array, format["%1 %2s",_briefcase_100oz,localize "STR_EPOCH_BRIEFCASE"]]; + _array set [count _array, format["%1 %2s",_briefcase_100oz,if (_localize) then {localize "STR_EPOCH_BRIEFCASE"} else {"Briefcase"}]]; }; if (_briefcase_100oz == 1) then { - _array set [count _array, format["%1 %2",_briefcase_100oz,localize "STR_EPOCH_BRIEFCASE"]]; + _array set [count _array, format["%1 %2",_briefcase_100oz,if (_localize) then {localize "STR_EPOCH_BRIEFCASE"} else {"Briefcase"}]]; }; } else { if (_briefcase_100oz > 0) then { @@ -120,7 +121,7 @@ if (_noIMG) then { if (_gold_10oz > 0) then { if (_noIMG) then { - _array set [count _array, format["%1 %2",_gold_10oz,localize "STR_EPOCH_10OZGOLD"]]; + _array set [count _array, format["%1 %2",_gold_10oz,if (_localize) then {localize "STR_EPOCH_10OZGOLD"} else {"10oz Gold"}]]; } else { _pic = getText (configFile >> 'CfgMagazines' >> 'ItemGoldBar10oz' >> 'picture'); _string = format["%3%1x",_gold_10oz,_pic, _string,_fontSize]; @@ -128,7 +129,7 @@ if (_gold_10oz > 0) then { }; if (_gold_1oz > 0) then { if (_noIMG) then { - _array set [count _array, format["%1 %2",_gold_1oz,localize "STR_EPOCH_GOLD"]]; + _array set [count _array, format["%1 %2",_gold_1oz,if (_localize) then {localize "STR_EPOCH_GOLD"} else {"Gold"}]]; } else { _pic = getText (configFile >> 'CfgMagazines' >> 'ItemGoldBar' >> 'picture'); _string = format["%3%1x",_gold_1oz,_pic, _string,_fontSize]; @@ -136,7 +137,7 @@ if (_gold_1oz > 0) then { }; if (_silver_10oz > 0) then { if (_noIMG) then { - _array set [count _array, format["%1 %2",_silver_10oz,localize "STR_EPOCH_10OZSILVER"]]; + _array set [count _array, format["%1 %2",_silver_10oz,if (_localize) then {localize "STR_EPOCH_10OZSILVER"} else {"10oz Silver"}]]; } else { _pic = getText (configFile >> 'CfgMagazines' >> 'ItemSilverBar10oz' >> 'picture'); _string = format["%3%1x",_silver_10oz,_pic, _string,_fontSize]; @@ -144,7 +145,7 @@ if (_silver_10oz > 0) then { }; if (_silver_1oz > 0) then { if (_noIMG) then { - _array set [count _array, format["%1 %2",_silver_1oz,localize "STR_EPOCH_SILVER"]]; + _array set [count _array, format["%1 %2",_silver_1oz,if (_localize) then {localize "STR_EPOCH_SILVER"} else {"Silver"}]]; } else { _pic = getText (configFile >> 'CfgMagazines' >> 'ItemSilverBar' >> 'picture'); _string = format["%3%1x",_silver_1oz,_pic, _string,_fontSize]; diff --git a/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_logTrade.sqf b/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_logTrade.sqf index c5e9f74fd..296eaf80d 100644 --- a/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_logTrade.sqf +++ b/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_logTrade.sqf @@ -12,7 +12,7 @@ _Z_logTrade = { case 1 : {"vehicle"}; case 2 : {"gear"}; }; - _price = if (Z_singleCurrency) then {format ["%1 %2",[_price] call BIS_fnc_numberText,CurrencyName]} else {[_price,true] call Z_calcCurrency}; + _price = if (Z_singleCurrency) then {format ["%1 %2",[_price] call BIS_fnc_numberText,CurrencyName]} else {[_price,true,1,1] call Z_calcCurrency}; // Log to client RPT if (_buyOrSell == "buy") then {