Classic Floating Combat Text

Classic Floating Combat Text

514k Downloads

round function in ClassicFCT can break other addons

SapMagic opened this issue ยท 1 comments

commented

In ClassicFCT, the function round is declared in global scope. The current version of wow doesn't have this function, but future versions do. Another addon, Gargul, tries to polyfill and use this function, but ends up calling the already-defined version in your addon.

The version in your addon doesn't behave quite the same as the polyfill, so it breaks Gargul.

Here's the relevant lines:

function round(n, d)
    local p = 10^d
    return math.floor(n * p) / p
end

I noticed this isn't used, so if I remove the function it fixes the problem. Could be good to refactor and/or remove this from your addon too.

commented

thanks for pointing it out, I overlooked it somehow.