RaidFlag

Raid flags contain the raid target marker information for a unit. They are returned from COMBAT_LOG_EVENT sourceRaidFlags and destRaidFlags params.
==Constants==
Source: FrameXML/Constants.lua
Icon	Constant 	Bit field	Bit field	Bit field	Bit field	Bit field	Bit field	Bit field	Bit field	Bit field
 	COMBATLOG_OBJECT_RAIDTARGET1 	0x 	0 	0 	0 	0 	0 	0 	0 	1
 	COMBATLOG_OBJECT_RAIDTARGET2 	0x 	0 	0 	0 	0 	0 	0 	0 	2
 	COMBATLOG_OBJECT_RAIDTARGET3 	0x 	0 	0 	0 	0 	0 	0 	0 	4
 	COMBATLOG_OBJECT_RAIDTARGET4 	0x 	0 	0 	0 	0 	0 	0 	0 	8
 	COMBATLOG_OBJECT_RAIDTARGET5 	0x 	0 	0 	0 	0 	0 	0 	1 	0
 	COMBATLOG_OBJECT_RAIDTARGET6 	0x 	0 	0 	0 	0 	0 	0 	2 	0
 	COMBATLOG_OBJECT_RAIDTARGET7 	0x 	0 	0 	0 	0 	0 	0 	4 	0
 	COMBATLOG_OBJECT_RAIDTARGET8 	0x 	0 	0 	0 	0 	0 	0 	8 	0
 	COMBATLOG_OBJECT_RAIDTARGET_MASK	0x 	0 	0 	0 	0 	0 	0 	F 	F
==Example==
* Checks if a flag has the target marker.
local raidFlags = 0x4
if bit.band(raidFlags, COMBATLOG_OBJECT_RAIDTARGET3) > 0 then
 	print("has diamond {rt3} target marker")
end
* You can conveniently use logarithm base 2 to convert raid flags to the standard 1-8 target markers.
local raidFlags = 0x80
local index = math.log(raidFlags) / math.log(2) + 1
local icon = ICON_LIST[index]
print("Target marker:", icon.."0|t")
 >> Target marker: 
* Example that prints combat log events for dest units with a target marker.
local raid_targets = {}
for i = 1, 8 do
	raid_targets[_G["COMBATLOG_OBJECT_RAIDTARGET"..i]] = ICON_LIST[i].."0|t"
end
local f = CreateFrame("Frame")
f:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
f:SetScript("OnEvent", function(self, event)
	self:COMBAT_LOG_EVENT_UNFILTERED(CombatLogGetCurrentEventInfo())
end)
function f:COMBAT_LOG_EVENT_UNFILTERED(...)
	local timestamp, subevent, _, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags = ...
	if bit.band(destRaidFlags, COMBATLOG_OBJECT_RAIDTARGET_MASK) > 0 then -- dest unit has a target marker
		print(subevent, destName, destRaidFlags, raid_targets[destRaidFlags])
	end
end
-- the lookup table would look like this
local raid_targets = {
	[1] = "|TInterface\\TargetingFrame\\UI-RaidTargetingIcon_1:0|t",
	[2] = "|TInterface\\TargetingFrame\\UI-RaidTargetingIcon_2:0|t",
	[4] = "|TInterface\\TargetingFrame\\UI-RaidTargetingIcon_3:0|t",
	[8] = "|TInterface\\TargetingFrame\\UI-RaidTargetingIcon_4:0|t",
	[16] = "|TInterface\\TargetingFrame\\UI-RaidTargetingIcon_5:0|t",
	[32] = "|TInterface\\TargetingFrame\\UI-RaidTargetingIcon_6:0|t",
	[64] = "|TInterface\\TargetingFrame\\UI-RaidTargetingIcon_7:0|t",
	[128] = "|TInterface\\TargetingFrame\\UI-RaidTargetingIcon_8:0|t",
}
: Source: COMBATLOG_OBJECT_RAIDTARGET, ICON_LIST
==Patch changes==
* 
* 
==See also==
* ()