Fix return change overflow check

Thanks @oiad

- Added compensation for money which will be removed from gear and
backpack
- Improved readability
This commit is contained in:
ebaydayz
2016-08-04 14:22:33 -04:00
parent 1b685581e3
commit d91bde9e53
3 changed files with 48 additions and 33 deletions

View File

@@ -225,7 +225,7 @@ if (typeName _money == "SCALAR") then {
_success = [player,_money] call SC_fnc_addCoins;
systemChat format[localize "STR_EPOCH_TRADE_SUCCESS_CHANGE", _money , CurrencyName];
} else {
_success = [_money,0,false,0] call Z_returnChange;
_success = [_money,0,false,0,[],[]] call Z_returnChange;
_tCost = "";
_tCost = _money call z_calcDefaultCurrencyNoImg;
if (_tCost != "") then { systemChat format[localize "STR_EPOCH_TRADE_SELL_SUCCESS",_tCost]; };