Code:
local HOSTILE_PLAYER = bit_bor(COMBAT_LOG_REACTION_HOSTILE, COMBATLOG_OBJECT_CONTROL_PLAYER)
if bit_band(sourceFlags, HOSTILE_PLAYER) ~= 0 then
-- source is a hostile player
end
You can find a complete list of combat log bitmasks here:
http://wow.go-hero.net/framexml/16309/Constants.lua#374
|
Hi Phanx,
I get error if i try to use this code.
I am not very confident in the COMBAT_LOG_REACTION_HOSTILE var name global.
I have added:
local bit_bor = bit.bor
local COMBAT_LOG_REACTION_HOSTILE = COMBAT_LOG_REACTION_HOSTILE
to my addon code but I always get an error like:
Lua Code:
bad argument #1 to "bit_bor" (number expected, got nil)
Again, thanks really very much to you and to every reader and poster :-)