The conditions could look something like:
Lua Code:
if event == "PLAYER_TARGET_CHANGED" then
local FactionTextures = {
Alliance = "Interface\\AddOns\\[TextureLocation]\\AllianceTexture",
Horde = "Interface\\AddOns\\[TextureLocation]\\HordeTexture",
FFA = "Interface\\AddOns\\[TextureLocation]\\NeutralTexture",
}
local player = UnitIsPVPFreeForAll("player")
local target = UnitIsPVPFreeForAll("target")
if player and target then -- both are FFA, maybe this is all you need.
-- Set the texture to FactionTextures.FFA
-- show the frame
return
end
player = UnitFactionGroup("player")
target = UnitFactionGroup("target")
if player ~= target and target ~= "Neutral" then
-- set the texture to FactionTextures[target]
-- show the frame
else -- target is same faction or neutral
-- hide the frame
end
end