end
end
+local pvpIcons = {
+ Alliance = "Interface\\TARGETINGFRAME\\UI-PVP-Alliance",
+ Horde = "Interface\\TARGETINGFRAME\\UI-PVP-Horde"
+};
local function updatePVP(frame, unit)
if UnitIsPVPFreeForAll(unit) then
frame.pvp:SetTexture("Interface\\TARGETINGFRAME\\UI-PVP-FFA");
faction = "Horde";
end
end
- frame.pvp:SetTexture("Interface\\TARGETINGFRAME\\UI-PVP-"..faction);
+ frame.pvp:SetTexture(pvpIcons[faction]);
frame.pvp:Show();
else
frame.pvp:Hide();