From 7f1e24e77956415af805362f3ca121e53a85720e Mon Sep 17 00:00:00 2001 From: iceroth Date: Sun, 3 Sep 2006 12:41:48 +0000 Subject: [PATCH] TargetHealth bugfixes --- IceHUD.toc | 2 +- modules/TargetHealth.lua | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/IceHUD.toc b/IceHUD.toc index 7f168e4..04f416b 100644 --- a/IceHUD.toc +++ b/IceHUD.toc @@ -3,7 +3,7 @@ ## Name: IceHUD ## Title: IceHUD |cff7fff7f -Ace2-|r ## Notes: Another HUD mod -## Version: 0.6 ($Revision$) +## Version: 0.6.1 ($Revision$) ## SavedVariables: IceCoreDB ## OptionalDeps: Ace2, DewdropLib, FuBar_ToFu, DruidBar, SoleManax, MobHealth ## X-Category: UnitFrame diff --git a/modules/TargetHealth.lua b/modules/TargetHealth.lua index 66b64cd..254becf 100644 --- a/modules/TargetHealth.lua +++ b/modules/TargetHealth.lua @@ -95,6 +95,10 @@ function TargetHealth.prototype:Enable(core) self:RegisterEvent("UNIT_HEALTH", "Update") self:RegisterEvent("UNIT_MAXHEALTH", "Update") self:RegisterEvent("UNIT_FLAGS", "Update") + + if (self.moduleSettings.hideBlizz) then + self:HideBlizz() + end self:Update(self.unit) end @@ -181,7 +185,6 @@ end function TargetHealth.prototype:ShowBlizz() TargetFrame:Show() - TargetFrame:RegisterEvent("PLAYER_TARGET_CHANGED") TargetFrame:RegisterEvent("UNIT_HEALTH") TargetFrame:RegisterEvent("UNIT_LEVEL") @@ -191,13 +194,19 @@ function TargetHealth.prototype:ShowBlizz() TargetFrame:RegisterEvent("PLAYER_FLAGS_CHANGED") TargetFrame:RegisterEvent("PARTY_MEMBERS_CHANGED") TargetFrame:RegisterEvent("RAID_TARGET_UPDATE") + + ComboFrame:Show() + ComboFrame:RegisterEvent("PLAYER_TARGET_CHANGED"); + ComboFrame:RegisterEvent("PLAYER_COMBO_POINTS"); end function TargetHealth.prototype:HideBlizz() TargetFrame:Hide() - TargetFrame:UnregisterAllEvents() + + ComboFrame:Hide() + ComboFrame:UnregisterAllEvents() end