mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
Fixed Destruction Warlocks freezing on login in pre-7.0 (ticket #207)
Destruction Warlocks have a PowerMax of 1000 and apparently trying to create that many graphical frames blows something up really quick. In 7.0, everyone's runes are discrete objects, so I was trying to ensure that the graphical representations of a given power were ready at all times, but didn't consider the pre-7.0 case where this calculation would lead to an absurd number of "runes". This change also fixes an errant CreateFrame() in UpdateRunePower() that was supposed to be self:CreateFrame(). CreateFrame() was just creating a nameless, parentless frame for no reason at all. Good job, me. This isn't C++.
This commit is contained in:
@ -419,7 +419,9 @@ end
|
||||
function IceClassPowerCounter.prototype:Enable(core)
|
||||
IceClassPowerCounter.super.prototype.Enable(self, core)
|
||||
|
||||
self.numRunes = UnitPowerMax(self.unit, self.unitPower)
|
||||
if IceHUD.WowVer >= 70000 then
|
||||
self.numRunes = UnitPowerMax(self.unit, self.unitPower)
|
||||
end
|
||||
self:CreateFrame()
|
||||
|
||||
self:CheckValidLevel(nil, UnitLevel("player"))
|
||||
@ -487,10 +489,12 @@ function IceClassPowerCounter.prototype:UpdateRunePower(event, arg1, arg2)
|
||||
return
|
||||
end
|
||||
|
||||
local numMax = UnitPowerMax(self.unit, self.unitPower)
|
||||
if numMax ~= self.numRunes then
|
||||
self.numRunes = numMax
|
||||
CreateFrame()
|
||||
if IceHUD.WowVer >= 70000 then
|
||||
local numMax = UnitPowerMax(self.unit, self.unitPower)
|
||||
if numMax ~= self.numRunes then
|
||||
self.numRunes = numMax
|
||||
self:CreateFrame()
|
||||
end
|
||||
end
|
||||
|
||||
local numReady = UnitPower("player", self.unitPower)
|
||||
|
Reference in New Issue
Block a user