mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- Integrated a feature by slippycheeze that enables the current threat target's name to be displayed in the "lower text" portion of the Threat bar. http://www.wowace.com/addons/ice-hud/tickets/176-show-name-of-threat-holder-and-color-based-on-their/
This commit is contained in:
@ -58,6 +58,7 @@ function IceThreat.prototype:GetDefaultSettings()
|
|||||||
settings["displaySecondPlaceThreat"] = true
|
settings["displaySecondPlaceThreat"] = true
|
||||||
settings["secondPlaceThreatAlpha"] = 0.75
|
settings["secondPlaceThreatAlpha"] = 0.75
|
||||||
settings["bAllowExpand"] = false
|
settings["bAllowExpand"] = false
|
||||||
|
settings["showTankName"] = true
|
||||||
return settings
|
return settings
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -176,6 +177,23 @@ function IceThreat.prototype:GetOptions()
|
|||||||
order = 27.9
|
order = 27.9
|
||||||
}
|
}
|
||||||
|
|
||||||
|
opts["showTankName"] = {
|
||||||
|
type = 'toggle',
|
||||||
|
name = L["Show tank name"],
|
||||||
|
desc = L["Shows the name of the threat holder colorized by his or her role"],
|
||||||
|
get = function()
|
||||||
|
return self.moduleSettings.showTankName
|
||||||
|
end,
|
||||||
|
set = function(info, v)
|
||||||
|
self.moduleSettings.showTankName = v
|
||||||
|
self:Redraw()
|
||||||
|
end,
|
||||||
|
disabled = function()
|
||||||
|
return not self.moduleSettings.enabled
|
||||||
|
end,
|
||||||
|
order = 29.1,
|
||||||
|
}
|
||||||
|
|
||||||
return opts
|
return opts
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -327,7 +345,22 @@ threatValue = 100
|
|||||||
|
|
||||||
-- set percentage text
|
-- set percentage text
|
||||||
self:SetBottomText1( IceHUD:MathRound(self.moduleSettings.showScaledThreat and scaledPercent or rawPercent) .. "%" )
|
self:SetBottomText1( IceHUD:MathRound(self.moduleSettings.showScaledThreat and scaledPercent or rawPercent) .. "%" )
|
||||||
self:SetBottomText2()
|
if not self.moduleSettings.showTankName or isTanking then
|
||||||
|
-- nothing if we are the target
|
||||||
|
self:SetBottomText2()
|
||||||
|
else
|
||||||
|
-- display the name of the current threat holder
|
||||||
|
local name = select(1, UnitName("targettarget"))
|
||||||
|
local color
|
||||||
|
if UnitGroupRolesAssigned("targettarget") == "TANK" or GetPartyAssignment("MAINTANK", "targettarget") then
|
||||||
|
color = "ThreatLow"
|
||||||
|
elseif GetPartyAssignment("MAINASSIST", "targettarget") then
|
||||||
|
color = "ThreatMedium"
|
||||||
|
else
|
||||||
|
color = "ThreatHigh"
|
||||||
|
end
|
||||||
|
self:SetBottomText2(name, color)
|
||||||
|
end
|
||||||
|
|
||||||
if ( isTanking ) then
|
if ( isTanking ) then
|
||||||
rangeMulti = 1
|
rangeMulti = 1
|
||||||
|
Reference in New Issue
Block a user