I can't believe there's no generic "hide stuff in combat" addon, but this should work:
1. Type "/fstack" and put the cursor over the addon's frame. Take note of its name, as shown in the Frame Stack tooltip. Type "/fstack" again to hide the tooltip.
2. Insert the name you found into this code:
Code:
local f = CreateFrame("Frame")
f:RegisterEvent("PLAYER_REGEN_ENABLED")
f:RegisterEvent("PLAYER_REGEN_DISABLED")
f:SetScript("OnEvent", function(self, event)
NameOfTheFrameYouWantToHide:SetShown(event == "PLAYER_REGEN_ENABLED")
end)
If there are multiple frames you want to hide, use this version instead:
Code:
local framesToHide = {
"NameOfTheFrame",
"NameOfAnotherFrame",
"SomeOtherFrame",
"YetMoreFrames",
}
local f = CreateFrame("Frame")
f:RegisterEvent("PLAYER_REGEN_ENABLED")
f:RegisterEvent("PLAYER_REGEN_DISABLED")
f:SetScript("OnEvent", function(self, event)
local show = event == "PLAYER_REGEN_ENABLED"
for i = 1, #framesToHide
local frame = _G[framesToHide[i]]
if frame then
frame:SetShown(show)
end
end
end)
If you need help turning the above code into an addon, copy and paste it into this page:
http://addon.bool.no/