mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 14:50:13 -05:00
- added a workaround for DK runic power (and probably all power types) not updating after the new "predicted power" stuff that was added in the beta. specifically, UNIT_RUNIC_POWER doesn't fire any more with the predicted power system since it's supposed to build up slowly. this caused the runic power bar to never get updated as it degenerated. copied the "working" version from blizzard's UnitFrame.lua code (see UnitFrameManaBar_Initialize)
- fixed a lua error that was popping up every time the player mounted as a DK (why the crap do rune events fire for the non-existent rune 7 and 8 when you mount?!)
This commit is contained in:
@ -96,7 +96,7 @@ end
|
||||
|
||||
function PlayerMana.prototype:Enable(core)
|
||||
PlayerMana.super.prototype.Enable(self, core)
|
||||
|
||||
|
||||
self:CreateTickerFrame()
|
||||
|
||||
self:RegisterEvent("UNIT_MANA", "Update")
|
||||
@ -107,9 +107,14 @@ function PlayerMana.prototype:Enable(core)
|
||||
self:RegisterEvent("UNIT_MAXENERGY", "Update")
|
||||
-- DK rune stuff
|
||||
if IceHUD.WowVer >= 30000 then
|
||||
self:RegisterEvent("UNIT_RUNIC_POWER", "Update")
|
||||
if GetCVarBool("predictedPower") and self.frame then
|
||||
self.frame:SetScript("OnUpdate", function() self:Update(self.unit) end)
|
||||
else
|
||||
self:RegisterEvent("UNIT_RUNIC_POWER", "Update")
|
||||
end
|
||||
self:RegisterEvent("UNIT_MAXRUNIC_POWER", "Update")
|
||||
end
|
||||
|
||||
|
||||
self:RegisterEvent("UNIT_DISPLAYPOWER", "ManaType")
|
||||
|
||||
self:ManaType(self.unit)
|
||||
@ -140,9 +145,9 @@ function PlayerMana.prototype:ManaType(unit)
|
||||
if (unit ~= self.unit) then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
self.manaType = UnitPowerType(self.unit)
|
||||
|
||||
|
||||
-- register ticker for rogue energy
|
||||
if (self.moduleSettings.tickerEnabled and (self.manaType == 3) and self.alive) then
|
||||
self.tickerFrame:Show()
|
||||
|
Reference in New Issue
Block a user