Lua Code:
local instanceType = select(2, IsInInstance())
if instanceType == "pvp" or instanceType == "arena" then
self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
else
self:UnregisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
end
Not pro at coding but it's something like that