Skip to content

Commit

Permalink
DPS should show unnecessary decimal points
Browse files Browse the repository at this point in the history
  • Loading branch information
Anonomit committed Jul 19, 2024
1 parent 974ab7b commit b49e9c6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Operations/RewordWeaponStats.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b49e9c6

Please sign in to comment.