Fix Runes disappearing for DK on Wrath

MaxPower events fire, but I guess only Legion+ actually returns rune counts from this function. On Wrath it always returns 0, so the CheckMaxNumRunes logic was hiding all runes.
This commit is contained in:
Parnic
2022-09-20 14:27:31 -05:00
parent 20d26d8f5e
commit 701fb1373f
3 changed files with 14 additions and 2 deletions

View File

@ -1,5 +1,9 @@
# Changelog
v1.13.17.2:
- Fixed Runes disappearing for Death Knights on Wrath Classic when using the dual spec feature.
v1.13.17.1:
- Fixed Priests hanging on login on the retail client.

View File

@ -3,6 +3,8 @@ local Runes = IceCore_CreateClass(IceElement)
local IceHUD = _G.IceHUD
local RunesReturnedByMaxPower = IceHUD.WowVer >= 70000
local CooldownFrame_SetTimer = CooldownFrame_SetTimer
if CooldownFrame_Set then
CooldownFrame_SetTimer = CooldownFrame_Set
@ -265,7 +267,7 @@ end
-- OVERRIDE
function Runes.prototype:Enable(core)
if IceHUD.WowVer >= 70000 then
if RunesReturnedByMaxPower then
self.numRunes = UnitPowerMax("player", SPELL_POWER_RUNES)
end
@ -283,7 +285,9 @@ function Runes.prototype:Enable(core)
self:RegisterEvent("PLAYER_SPECIALIZATION_CHANGED", "UpdateRuneColors")
end
self:RegisterEvent("PLAYER_ENTERING_WORLD", "EnteringWorld")
self:RegisterEvent("UNIT_MAXPOWER", "CheckMaxNumRunes")
if RunesReturnedByMaxPower then
self:RegisterEvent("UNIT_MAXPOWER", "CheckMaxNumRunes")
end
if (self.moduleSettings.hideBlizz) then
self:HideBlizz()

View File

@ -1,5 +1,9 @@
# Changelog
v1.13.17.2:
- Fixed Runes disappearing for Death Knights on Wrath Classic when using the dual spec feature.
v1.13.17.1:
- Fixed Priests hanging on login on the retail client.