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

@ -1,3 +1,6 @@
v1.12.13:
- Fixed various class power indicators using the wrong alpha visibility if the player teleported (like with a Hearthstone) when they had a target selected.
v1.12.12:
- (Classic) Fixed an error when certain spell events fire (like turning in Arathi Basin tokens) with LibClassicCasterino installed.
- Fixed Death Knight Runes using the wrong alpha visibility if the player teleported (like with a Hearthstone) when they had a target selected.

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

View File

@ -107,6 +107,7 @@ function ShardCounter.prototype:UpdateRunePower(event, arg1, arg2)
end
if event == "PLAYER_ENTERING_WORLD" and IceHUD.WowVer < 70000 then
self:TargetChanged()
self:UpdatePowerType(event)
end

View File

@ -157,6 +157,7 @@ function StaggerBar.prototype:UpdateShown()
end
function StaggerBar.prototype:PLAYER_ENTERING_WORLD()
self:TargetChanged()
self:UpdateStaggerBar()
end

View File

@ -215,7 +215,7 @@ function Totems.prototype:Enable(core)
Totems.super.prototype.Enable(self, core)
self:RegisterEvent("PLAYER_TOTEM_UPDATE", "UpdateTotem");
self:RegisterEvent("PLAYER_ENTERING_WORLD", "ResetTotemAvailability");
self:RegisterEvent("PLAYER_ENTERING_WORLD", "EnteringWorld");
if self.moduleSettings.hideBlizz then
self:HideBlizz()
@ -230,6 +230,11 @@ function Totems.prototype:Disable(core)
end
end
function Totems.prototype:EnteringWorld()
self:TargetChanged()
self:ResetTotemAvailability()
end
function Totems.prototype:ResetTotemAvailability()
for i=1, self.numTotems do
self:UpdateTotem(nil, i)