icon:SetVertexColor(1, 1, 1) |
return f:Show() |
end |
local prestige = UnitPrestige(unit) |
if cache.pvpffa then -- free for all pvp (Arena) |
icon:SetTexture("Interface\\TargetingFrame\\UI-PVP-FFA") |
icon:SetVertexColor(1, 1, 1) |
f:Show() |
f:Show() |
elseif cache.pvp then |
if cache.faction ~= "" then -- faction pvp (Alliance, Horde) |
icon:SetTexture("Interface\\TargetingFrame\\UI-PVP-"..(cache.faction or "FFA")) |
if prestige > 0 then |
icon:SetTexture(GetPrestigeInfo(prestige)) |
icon:SetVertexColor(1, 1, 1) |
f:Show() |
else -- nonfaction pvp |
icon:SetTexture("Interface\\TargetingFrame\\UI-PVP-FFA") |
icon:SetVertexColor(Stuf:GetColorFromMethod("reaction", uf)) |
f:Show() |
else |
if cache.faction ~= "" then -- faction pvp (Alliance, Horde) |
icon:SetTexture("Interface\\TargetingFrame\\UI-PVP-"..(cache.faction or "FFA")) |
icon:SetVertexColor(1, 1, 1) |
f:Show() |
else -- nonfaction pvp |
icon:SetTexture("Interface\\TargetingFrame\\UI-PVP-FFA") |
icon:SetVertexColor(Stuf:GetColorFromMethod("reaction", uf)) |
f:Show() |
end |
if UnitIsMercenary(unit) then |
if cache.faction == "Horde" then |
icon:SetTexture("Interface\\TargetingFrame\\UI-PVP-Alliance") |
elseif cache.faction == "Alliance" then |
icon:SetTexture("Interface\\TargetingFrame\\UI-PVP-Horde") |
end |
end |
end |
else -- not pvp |
f:Hide() |