mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-25 21:40:49 +00:00
targettarget: fix nil color error
This commit is contained in:
@@ -53,10 +53,11 @@ pfUI:RegisterModule("targettarget", function ()
|
|||||||
|
|
||||||
pfUI.uf.targettarget.hp.bar:SetMinMaxValues(0, UnitHealthMax("targettarget"))
|
pfUI.uf.targettarget.hp.bar:SetMinMaxValues(0, UnitHealthMax("targettarget"))
|
||||||
|
|
||||||
local r, g, b = (color.r + .5) * .5, (color.g + .5) * .5, (color.b + .5) * .5
|
if color then
|
||||||
|
local r, g, b = (color.r + .5) * .5, (color.g + .5) * .5, (color.b + .5) * .5
|
||||||
pfUI.uf.targettarget.hp.bar:SetStatusBarColor(r, g, b, UnitHealth("targettarget") / UnitHealthMax("targettarget") / 4 + .75)
|
pfUI.uf.targettarget.hp.bar:SetStatusBarColor(r, g, b, UnitHealth("targettarget") / UnitHealthMax("targettarget") / 4 + .75)
|
||||||
pfUI.uf.targettarget.hp.text:SetTextColor(r+.3,g+.3,b+.3, 1)
|
pfUI.uf.targettarget.hp.text:SetTextColor(r+.3,g+.3,b+.3, 1)
|
||||||
|
end
|
||||||
pfUI.uf.targettarget.hp.text:SetText( UnitName("targettarget"))
|
pfUI.uf.targettarget.hp.text:SetText( UnitName("targettarget"))
|
||||||
|
|
||||||
local display, real
|
local display, real
|
||||||
|
|||||||
Reference in New Issue
Block a user