Fixed various class power indicators using the wrong alpha sometimes

This commit is contained in:
Parnic
2020-05-30 15:25:02 -05:00
parent a9cf5d5b2c
commit db7d797eb2
5 changed files with 17 additions and 2 deletions

View File

@ -467,7 +467,7 @@ function IceClassPowerCounter.prototype:DisplayCounter()
self:RegisterEvent(IceHUD.UnitPowerEvent, "UpdateRunePower")
self:RegisterEvent("UNIT_DISPLAYPOWER", "UpdateRunePower")
self:RegisterEvent("PLAYER_ENTERING_WORLD", "UpdateRunePower")
self:RegisterEvent("PLAYER_ENTERING_WORLD", "EnteringWorld")
if (self.moduleSettings.hideBlizz) then
self:HideBlizz()
@ -484,6 +484,11 @@ function IceClassPowerCounter.prototype:Disable(core)
end
end
function IceClassPowerCounter.prototype:EnteringWorld()
self:TargetChanged()
self:UpdateRunePower()
end
function IceClassPowerCounter.prototype:UpdateRunePower(event, arg1, arg2)
if event and (event == IceHUD.UnitPowerEvent or event == "UNIT_POWER_FREQUENT") and arg1 ~= "player" and arg1 ~= "vehicle" then
return