Couldn't you just disable showParty, showSolo and showPlayer aswell?
That should remove the party display when you are in a raid that meets the requirements.
Lua Code:
local raidToParty = CreateFrame("Frame")
raidToParty:RegisterEvent("PLAYER_ENTERING_WORLD")
raidToParty:RegisterEvent("GROUP_ROSTER_UPDATE")
raidToParty:SetScript("OnEvent", function()
if GetNumGroupMembers() > 5 then
party:SetAttribute("showSolo", false)
party:SetAttribute("showPlayer", false)
party:SetAttribute("showParty", false)
party:SetAttribute("showRaid", false)
raid:SetAttribute("showSolo", false)
raid:SetAttribute("showPlayer", false)
raid:SetAttribute("showParty", false)
raid:SetAttribute("showRaid", true)
else
party:SetAttribute("showSolo", false) -- show player when solo
party:SetAttribute("showPlayer", true) --show player unit in 5man group
party:SetAttribute("showParty", true)
party:SetAttribute("showRaid", true)
raid:SetAttribute("showSolo", false)
raid:SetAttribute("showPlayer", false)
raid:SetAttribute("showParty", false)
raid:SetAttribute("showRaid", false)
end
end)
The macro conditions have its boundaries.