mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-20 19:30:49 +00:00
tooltip: better approach to detect pvp titles
This commit is contained in:
+2
-2
@@ -205,7 +205,7 @@ pfUI:RegisterModule("tooltip", "vanilla:tbc", function ()
|
|||||||
local _, class = UnitClass(unit)
|
local _, class = UnitClass(unit)
|
||||||
local guild, rankstr, rankid = GetGuildInfo(unit)
|
local guild, rankstr, rankid = GetGuildInfo(unit)
|
||||||
local reaction = UnitReaction(unit, "player")
|
local reaction = UnitReaction(unit, "player")
|
||||||
local pvptitle = gsub(pvpname or name," "..name, "", 1)
|
local pvptitle = gsub(gsub(pvpname or name, name, "", 1), "^%s*(.-)%s*$", "%1")
|
||||||
local hp = UnitHealth(unit)
|
local hp = UnitHealth(unit)
|
||||||
local hpm = UnitHealthMax(unit)
|
local hpm = UnitHealthMax(unit)
|
||||||
|
|
||||||
@@ -224,7 +224,7 @@ pfUI:RegisterModule("tooltip", "vanilla:tbc", function ()
|
|||||||
GameTooltipStatusBar:SetStatusBarColor_orig(color.r, color.g, color.b)
|
GameTooltipStatusBar:SetStatusBarColor_orig(color.r, color.g, color.b)
|
||||||
GameTooltip:SetBackdropBorderColor(color.r, color.g, color.b)
|
GameTooltip:SetBackdropBorderColor(color.r, color.g, color.b)
|
||||||
end
|
end
|
||||||
if pvptitle ~= name then
|
if pvptitle ~= name and pvptitle ~= "" then
|
||||||
GameTooltip:AppendText(" |cff666666["..pvptitle.."]|r")
|
GameTooltip:AppendText(" |cff666666["..pvptitle.."]|r")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user