if not EventHandlerLog then
EventHandlerLog = CreateFrame('Frame')
EventHandlerLog:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
function OnSuccessfulCast(self, event, ...)
local timestamp, type, hideCaster, sourceGUID, sourceName, sourceFlags, sourceFlags2, destGUID, destName, destFlags, destFlags2 = select(1, ...)
--print("timestamp = "..timestamp, " type = "..type, " sourceGUID = "..sourceGUID, " sourceName = "..sourceName, " sourceFlags = "..sourceFlags, " sourceflags2 = "..sourceFlags2, " destGUID = "..destGUID, " destName = "..destName, " destFlags = "..destFlags, " destFlag2 = "..destFlags2)
if (event=="COMBAT_LOG_EVENT_UNFILTERED") then
--[[local COMBATLOG_OBJECT_TYPE_PLAYER = COMBATLOG_OBJECT_TYPE_PLAYER
local COMBATLOG_OBJECT_REACTION_HOSTILE = COMBATLOG_OBJECT_REACTION_HOSTILE
local COMBATLOG_OBJECT_REACTION_FRIENDLY = COMBATLOG_OBJECT_REACTION_FRIENDLY
local COMBATLOG_OBJECT_REACTION_NEUTRAL = COMBATLOG_OBJECT_REACTION_NEUTRAL]]
local isFriendly = (bit.band(destFlags,COMBATLOG_OBJECT_REACTION_FRIENDLY) == COMBATLOG_OBJECT_REACTION_FRIENDLY)
local isPlayer = (bit.band(destFlags,COMBATLOG_OBJECT_TYPE_PLAYER) == COMBATLOG_OBJECT_CONTROL_PLAYER)
local isHostile = (bit.band(destFlags,COMBATLOG_OBJECT_REACTION_HOSTILE) == COMBATLOG_OBJECT_REACTION_HOSTILE)
local isNeutral = (bit.band(destFlags,COMBATLOG_OBJECT_REACTION_NEUTRAL) == COMBATLOG_OBJECT_REACTION_NEUTRAL)
if isFriendly and isPlayer then return end
--if not isPlayer and not isNeutral then return end
--if not isHostile and not isNeutral then return end