From c0d230b6bdabcc1777731d2efee7352e66e806b9 Mon Sep 17 00:00:00 2001 From: ckcz123 Date: Sun, 24 May 2020 20:29:01 +0800 Subject: [PATCH] fix formatBigNumber --- libs/ui.js | 2 +- libs/utils.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/ui.js b/libs/ui.js index a27d5c0b..14f37612 100644 --- a/libs/ui.js +++ b/libs/ui.js @@ -2505,7 +2505,7 @@ ui.prototype._drawEquipbox_drawStatusChanged = function (info, y, equip, equipTy var nowValue = core.getRealStatus(name); // 查询新值 var newValue = (core.getStatus(name) + (compare.value[name] || 0)) - * (core.getBuff(name) + (compare.percentage[name] || 0) / 100); + * ((core.getBuff(name) * 100 + (compare.percentage[name] || 0)) / 100); if (nowValue == newValue) continue; var text = this._drawEquipbox_getStatusName(name); this._drawEquipbox_drawStatusChanged_draw(text + " ", '#CCCCCC', obj); diff --git a/libs/utils.js b/libs/utils.js index a4f7171f..6ada02f9 100644 --- a/libs/utils.js +++ b/libs/utils.js @@ -401,7 +401,7 @@ utils.prototype.formatSize = function (size) { utils.prototype.formatBigNumber = function (x, onMap) { x = Math.floor(parseFloat(x)); if (!core.isset(x)) return '???'; - if (x > 1e24 || x < -1e24) return x; + if (x > 1e24 || x < -1e24) return x.toExponential(2); var c = x < 0 ? "-" : ""; x = Math.abs(x);