mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 14:50:13 -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:
@ -128,7 +128,21 @@ function PlayerMana.prototype:SetupOnUpdate(enable)
|
||||
if enable then
|
||||
self.frame:SetScript("OnUpdate", function() self:Update(self.unit) end)
|
||||
else
|
||||
self.frame:SetScript("OnUpdate", nil)
|
||||
-- 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
|
||||
self.frame:SetScript("OnUpdate", nil)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function PlayerMana.prototype:MyOnUpdate()
|
||||
PlayerMana.super.prototype.MyOnUpdate(self)
|
||||
|
||||
if self.CurrScale == self.DesiredScale then
|
||||
self:SetupOnUpdate(false)
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user