- attempt to fix ticket #81

This commit is contained in:
Parnic
2010-10-14 01:56:14 +00:00
parent 272f0fd42d
commit 6e97485333
2 changed files with 7 additions and 2 deletions

View File

@ -151,6 +151,11 @@ function EclipseBar.prototype:UpdateEclipsePower()
local power = UnitPower("player", SPELL_POWER_ECLIPSE)
local maxPower = UnitPowerMax("player", SPELL_POWER_ECLIPSE)
-- bad api, bad.
if maxPower <= 0 or power > maxPower then
return
end
self:SetBottomText1(abs((power/maxPower) * 100))
local pos = (power/maxPower) / 2