From b49e9c6614f3af6e6d286c7591ddf41a594615a5 Mon Sep 17 00:00:00 2001 From: Anonomit Date: Fri, 19 Jul 2024 17:07:21 -0400 Subject: [PATCH] DPS should show unnecessary decimal points --- Operations/RewordWeaponStats.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Operations/RewordWeaponStats.lua b/Operations/RewordWeaponStats.lua index ac2cbe5..6ba0376 100644 --- a/Operations/RewordWeaponStats.lua +++ b/Operations/RewordWeaponStats.lua @@ -157,9 +157,10 @@ function Addon:ModifyWeaponDamagePerSecond(text) if not origNumber then return text end local noThousandsSeparator = not self:GetOption("separateThousands", stat) - local precision = (1 / 10^self:GetOption("precision", stat)) or 1 + local numDecimalPlaces = self:GetOption("precision", stat) + local precision = (1 / 10^numDecimalPlaces) or 1 - local strNumber = self:ToFormattedNumber(self:Round(self:ToNumber(origNumber), precision), nil, nil, noThousandsSeparator and "" or nil) + local strNumber = self:ToFormattedNumber(self:Round(self:ToNumber(origNumber), precision), numDecimalPlaces, nil, noThousandsSeparator and "" or nil) text = strGsub(text, self:CoverSpecialCharacters(origNumber), strNumber) if self:GetOption("doReword", stat) then