- patched up the TargetHealth (+ToTHealth +CustomHealth) modules to create the raid icon during CreateFrame() instead of Enable() to ensure that nothing's called in an unexpected order

This commit is contained in:
Parnic
2010-11-18 19:45:36 +00:00
parent 6771fc0647
commit 022eb11678

View File

@ -646,8 +646,6 @@ function IceTargetHealth.prototype:Enable(core)
self:HideBlizz() self:HideBlizz()
end end
self:CreateRaidIconFrame()
self:Update(self.unit) self:Update(self.unit)
RegisterUnitWatch(self.frame) RegisterUnitWatch(self.frame)
@ -746,6 +744,11 @@ function IceTargetHealth.prototype:EnableClickTargeting(bEnable)
end end
end end
function IceTargetHealth.prototype:OnShow()
IceTargetHealth.super.prototype.OnShow(self)
self:Update(self.unit)
end
function IceTargetHealth.prototype:UpdateEvent(event, unit) function IceTargetHealth.prototype:UpdateEvent(event, unit)
self:Update(unit) self:Update(unit)
@ -909,6 +912,8 @@ end
function IceTargetHealth.prototype:CreateFrame() function IceTargetHealth.prototype:CreateFrame()
IceTargetHealth.super.prototype.CreateFrame(self) IceTargetHealth.super.prototype.CreateFrame(self)
self:CreateRaidIconFrame()
-- for showing/hiding the frame based on unit visibility -- for showing/hiding the frame based on unit visibility
self.frame:SetAttribute("unit", self.unit) self.frame:SetAttribute("unit", self.unit)
end end