Hello,

I'm using tidy plates with the threat plates extension. I've tried to message the author directly and also message the comment board on wowinterface where he maintains the addon, however for some infuriating reason I cannot get posting permission for that site (anyone know why I cant post on wowinterface.com?).

I would really love to see this feature implemented where enemies with at certain %HP thresholds get their bar colour changed. An example being when a marksman hunter is able to killshot a mob at 35% hp or lower, that the enemies in this range have their bars change color/size.

I apologize if this is frowned upon in the addon community, but is it possible to jerry-rig this functionality into the threatplates lua code? I believe the code responsible for setting the bar colour is what I list below.

At the moment it is possible to change the color of nameplates according to mob health, but only in a continual fashion. I would greatly prefer a discrete colour change, where >35% is red (default), and <=35% is light blue? Alternatively instead of changing the colour, if this could instead change the scale of the nameplate slightly.


local function GetThreatColor(unit,style)
local db = TidyPlatesThreat.db.profile
local c
if (db.threat.ON and db.threat.useHPColor and InCombatLockdown() and (style == "dps" or style == "tank")) then
if not isTanked then -- This value is going to be determined in the SetStyles function.
if db.threat.nonCombat then
if (unit.isInCombat or (unit.health < unit.healthmax)) then
c = db.settings[style].threatcolor[unit.threatSituation]
else
c = GetClassColor(unit)
end
else
c = db.settings[style].threatcolor[unit.threatSituation]
end
else
c = db.tHPbarColor
end
else
c = GetClassColor(unit)
end
return c
end

local function SetHealthbarColor(unit)
local db = TidyPlatesThreat.db.profile
local style = TidyPlatesThreat.SetStyle(unit)
local c, allowMarked
if style == "totem" then
local tS = db.totemSettings[ThreatPlates_Totems[unit.name]]
if tS[2] then
c = tS.color
end
elseif style == "unique" then
for k_c,k_v in pairs(db.uniqueSettings.list) do
if k_v == unit.name then
local u = db.uniqueSettings[k_c]
allowMarked = u.allowMarked
if u.useColor then
c = u.color
else
c = GetThreatColor(unit,style)
end
end
end
else
if db.healthColorChange then
local pct = unit.health / unit.healthmax --Is this where the code could be implemented?
local r,g,b = CS:GetSmudgeColorRGB(db.aHPbarColor,db.bHPbarColor,pct)
c = {r = r,g = g, b = b}
elseif db.customColor then
if (db.threat.ON and db.threat.useHPColor and InCombatLockdown() and (style == "dps" or style == "tank")) then -- Need a better way to impliment this.
c = GetThreatColor(unit,style)
else
c = db[reference[unit.reaction]]
end
else
c = GetThreatColor(unit,style)
end
end
if unit.isMarked then
c = GetMarkedColor(unit,c,allowMarked) -- c will set itself back to c if marked color is disabled
end
if c then
return c.r, c.g, c.b
else
return unit.red, unit.green, unit.blue
end
end

TidyPlatesThreat.SetHealthbarColor = SetHealthbarColor








Thanks for any help/lua programming advice anyone can offer :P,

Bic