Enable/disable for TargetInfo and TargetofTarget now works properly

This commit is contained in:
iceroth
2006-12-09 14:08:10 +00:00
parent 123dbf2542
commit 7e88da3a25
3 changed files with 17 additions and 4 deletions

View File

@ -50,6 +50,16 @@ function TargetInfo.prototype:Enable(core)
self:RegisterEvent("UNIT_DYNAMIC_FLAGS", "TargetFlags")
self:RegisterEvent("RAID_TARGET_UPDATE", "UpdateRaidTargetIcon")
RegisterUnitWatch(self.frame)
end
-- OVERRIDE
function TargetInfo.prototype:Disable(core)
TargetInfo.super.prototype.Disable(self, core)
UnregisterUnitWatch(self.frame)
end
@ -284,9 +294,8 @@ function TargetInfo.prototype:CreateFrame(redraw)
self.frame:SetScale(self.moduleSettings.scale)
-- register showing/hiding the frame depending on current target
-- set showing/hiding the frame depending on current target
self.frame:SetAttribute("unit", target)
RegisterUnitWatch(self.frame)
self.frame:SetFrameStrata("BACKGROUND")
self.frame:SetWidth(self.width)