mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-03 04:00:02 +00:00
panel: fix division by zero in exp display
This commit is contained in:
+6
-2
@@ -220,8 +220,12 @@ pfUI:RegisterModule("panel", function ()
|
||||
if oldexp ~= nil then
|
||||
difexp = curexp - oldexp
|
||||
maxexp = UnitXPMax("player")
|
||||
remexp = floor((maxexp - curexp)/difexp)
|
||||
remstring = "|cff555555 [" .. remexp .. "]|r"
|
||||
if difexp > 0 then
|
||||
remexp = floor((maxexp - curexp)/difexp)
|
||||
remstring = "|cff555555 [" .. remexp .. "]|r"
|
||||
else
|
||||
remstring = nil
|
||||
end
|
||||
end
|
||||
oldexp = curexp
|
||||
|
||||
|
||||
Reference in New Issue
Block a user