- fixed TargetTargetHealth module from not hiding when the player was the ToT and the self-display mode was set to "hide"

This commit is contained in:
Parnic
2010-07-20 01:23:44 +00:00
parent 0a73b2883e
commit 44ee8e66a6

View File

@ -70,7 +70,7 @@ function TargetTargetHealth.prototype:GetOptions()
IceHUD.IceCore:SetColor("SelfColor", r, g, b) IceHUD.IceCore:SetColor("SelfColor", r, g, b)
end, end,
disabled = function() disabled = function()
return not self.moduleSettings.enabled or self.moduleSettings.selfDisplayMode ~= "Color as SelfColor" return not self.moduleSettings.enabled
end, end,
hasAlpha = false, hasAlpha = false,
order = 45, order = 45,
@ -130,11 +130,19 @@ function TargetTargetHealth.prototype:Update(unit)
if self.moduleSettings.selfDisplayMode == "Color as SelfColor" then if self.moduleSettings.selfDisplayMode == "Color as SelfColor" then
self.color = "SelfColor" self.color = "SelfColor"
elseif self.moduleSettings.selfDisplayMode == "Hide" then elseif self.moduleSettings.selfDisplayMode == "Hide" then
if self:IsVisible() then
UnregisterUnitWatch(self.frame)
end
self:Show(false) self:Show(false)
return return
end end
end end
if not self:IsVisible() then
RegisterUnitWatch(self.frame)
end
self:Show(true) self:Show(true)
self.determineColor = false self.determineColor = false