From 022eb116783099cac025d3fe89a779feb6d3e69b Mon Sep 17 00:00:00 2001 From: Parnic Date: Thu, 18 Nov 2010 19:45:36 +0000 Subject: [PATCH] - 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 --- modules/TargetHealth.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/TargetHealth.lua b/modules/TargetHealth.lua index 2885523..c00a0db 100644 --- a/modules/TargetHealth.lua +++ b/modules/TargetHealth.lua @@ -646,8 +646,6 @@ function IceTargetHealth.prototype:Enable(core) self:HideBlizz() end - self:CreateRaidIconFrame() - self:Update(self.unit) RegisterUnitWatch(self.frame) @@ -746,6 +744,11 @@ function IceTargetHealth.prototype:EnableClickTargeting(bEnable) end end +function IceTargetHealth.prototype:OnShow() + IceTargetHealth.super.prototype.OnShow(self) + + self:Update(self.unit) +end function IceTargetHealth.prototype:UpdateEvent(event, unit) self:Update(unit) @@ -909,6 +912,8 @@ end function IceTargetHealth.prototype:CreateFrame() IceTargetHealth.super.prototype.CreateFrame(self) + self:CreateRaidIconFrame() + -- for showing/hiding the frame based on unit visibility self.frame:SetAttribute("unit", self.unit) end