mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 22:51:53 -05:00
- hopefully fixed a bug with max'ing out the player's mana bar with a mana potion, life tap, mana gem, etc.; now letting the animation finish out normally before turning off the OnUpdate
This commit is contained in:
@ -127,10 +127,24 @@ end
|
|||||||
function PlayerMana.prototype:SetupOnUpdate(enable)
|
function PlayerMana.prototype:SetupOnUpdate(enable)
|
||||||
if enable then
|
if enable then
|
||||||
self.frame:SetScript("OnUpdate", function() self:Update(self.unit) end)
|
self.frame:SetScript("OnUpdate", function() self:Update(self.unit) end)
|
||||||
|
else
|
||||||
|
-- make sure the animation has a chance to finish filling up the bar before we cut it off completely
|
||||||
|
if self.CurrScale ~= self.DesiredScale then
|
||||||
|
self.frame:SetScript("OnUpdate", function() self:MyOnUpdate() end)
|
||||||
else
|
else
|
||||||
self.frame:SetScript("OnUpdate", nil)
|
self.frame:SetScript("OnUpdate", nil)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function PlayerMana.prototype:MyOnUpdate()
|
||||||
|
PlayerMana.super.prototype.MyOnUpdate(self)
|
||||||
|
|
||||||
|
if self.CurrScale == self.DesiredScale then
|
||||||
|
self:SetupOnUpdate(false)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
-- OVERRIDE
|
-- OVERRIDE
|
||||||
|
Reference in New Issue
Block a user