mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 14:50:13 -05:00
Merge pull request #3 from TwentyOneZ/master
RealMobHealth addon compatibility
This commit is contained in:
@ -842,21 +842,46 @@ function IceTargetHealth.prototype:Update(unit)
|
|||||||
|
|
||||||
self:UpdateBar(self.healthPercentage, self.color)
|
self:UpdateBar(self.healthPercentage, self.color)
|
||||||
|
|
||||||
if not IceHUD.IceCore:ShouldUseDogTags() and self.frame:IsVisible() then
|
if IsAddOnLoaded("RealMobHealth") then
|
||||||
self:SetBottomText1(math.floor(self.healthPercentage * 100))
|
if not IceHUD.IceCore:ShouldUseDogTags() and self.frame:IsVisible() then
|
||||||
|
self:SetBottomText1(math.floor(self.healthPercentage * 100))
|
||||||
|
|
||||||
if self.moduleSettings.abbreviateHealth then
|
if self.moduleSettings.abbreviateHealth then
|
||||||
self.health = self:Round(self.health)
|
if RealMobHealth.UnitHasHealthData(unit) then
|
||||||
self.maxHealth = self:Round(self.maxHealth)
|
self.health, self.maxHealth = RealMobHealth.GetUnitHealth(unit)
|
||||||
end
|
end
|
||||||
|
self.health = self:Round(self.health)
|
||||||
|
self.maxHealth = self:Round(self.maxHealth)
|
||||||
|
end
|
||||||
|
|
||||||
if (self.maxHealth ~= 100) then
|
if RealMobHealth.UnitHasHealthData(unit) or (self.maxHealth ~= 100) then
|
||||||
self:SetBottomText2(self:GetFormattedText(self.health, self.maxHealth), self.color)
|
if RealMobHealth.UnitHasHealthData(unit) then
|
||||||
else
|
self.health, self.maxHealth = RealMobHealth.GetUnitHealth(unit)
|
||||||
self:SetBottomText2()
|
self:SetBottomText2(self:GetFormattedText(self.health, self.maxHealth), self.color)
|
||||||
|
else
|
||||||
|
self:SetBottomText2(self:GetFormattedText(self.health, self.maxHealth), self.color)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
self:SetBottomText2()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
if not IceHUD.IceCore:ShouldUseDogTags() and self.frame:IsVisible() then
|
||||||
|
self:SetBottomText1(math.floor(self.healthPercentage * 100))
|
||||||
|
|
||||||
|
if self.moduleSettings.abbreviateHealth then
|
||||||
|
self.health = self:Round(self.health)
|
||||||
|
self.maxHealth = self:Round(self.maxHealth)
|
||||||
|
end
|
||||||
|
|
||||||
|
if (self.maxHealth ~= 100) then
|
||||||
|
self:SetBottomText2(self:GetFormattedText(self.health, self.maxHealth), self.color)
|
||||||
|
else
|
||||||
|
self:SetBottomText2()
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
self:CheckPvP()
|
self:CheckPvP()
|
||||||
self:CheckPartyRole()
|
self:CheckPartyRole()
|
||||||
self:SetIconAlpha()
|
self:SetIconAlpha()
|
||||||
|
Reference in New Issue
Block a user