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: v1.12.12:
- (Classic) Fixed an error when certain spell events fire (like turning in Arathi Basin tokens) with LibClassicCasterino installed. - (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. - 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(IceHUD.UnitPowerEvent, "UpdateRunePower")
self:RegisterEvent("UNIT_DISPLAYPOWER", "UpdateRunePower") self:RegisterEvent("UNIT_DISPLAYPOWER", "UpdateRunePower")
self:RegisterEvent("PLAYER_ENTERING_WORLD", "UpdateRunePower") self:RegisterEvent("PLAYER_ENTERING_WORLD", "EnteringWorld")
if (self.moduleSettings.hideBlizz) then if (self.moduleSettings.hideBlizz) then
self:HideBlizz() self:HideBlizz()
@ -484,6 +484,11 @@ function IceClassPowerCounter.prototype:Disable(core)
end end
end end
function IceClassPowerCounter.prototype:EnteringWorld()
self:TargetChanged()
self:UpdateRunePower()
end
function IceClassPowerCounter.prototype:UpdateRunePower(event, arg1, arg2) 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 if event and (event == IceHUD.UnitPowerEvent or event == "UNIT_POWER_FREQUENT") and arg1 ~= "player" and arg1 ~= "vehicle" then
return return

View File

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

View File

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

View File

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