new problem with a table
i think the table is not the problem this time.. i think it is the event.. i tryed eyverthing for hours but i dont get it.
no print("TEST")
Lua Code:
local bloodlust = { 2825, 32182, 90355, 160452, 80353, 1459, };
local a = CreateFrame( "Frame" )
a:RegisterEvent( "COMBAT_LOG_EVENT_UNFILTERED" )
a:SetScript( "OnEvent", function( self, event, ...)
function a:COMBAT_LOG_EVENT_UNFILTERED(e, timestamp, event, hideCaster, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags, ...)
if (event == "SPELL_AURA_APPLIED") and (destName == UnitName("player")) then
local spellId, spellName, spellSchool, auraType = ...;
for _,v in pairs(bloodlust) do
if v == spellId then
print("TEST")
end
end
end
end
end )
EDIT:
i found a possible solution:
Lua Code:
local bloodlust = { 2825, 32182, 90355, 160452, 80353, 1459, };
local a = CreateFrame( "Frame" )
a:RegisterEvent( "COMBAT_LOG_EVENT_UNFILTERED" )
a:SetScript( "OnEvent", function( self, event, timestamp, type, hideCaster, sourceGUID, sourceName, sourceFlags, sourceFlags2, destGUID, destName, destFlags, destFlags2, ...)
if (type == "SPELL_AURA_APPLIED") and (destName == UnitName("player")) then
local spellId, spellName, spellSchool, auraType = ...;
for _,v in pairs(bloodlust) do
if v == spellId then
print("TEST")
end
end
end
end )
is this code okay?