View Single Post
08-19-15, 09:49 AM   #26
Endzeit
A Deviate Faerie Dragon
Join Date: Aug 2015
Posts: 12
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:
  1. local bloodlust = { 2825, 32182, 90355, 160452, 80353, 1459, };
  2. local a = CreateFrame( "Frame" )
  3. a:RegisterEvent( "COMBAT_LOG_EVENT_UNFILTERED" )
  4. a:SetScript( "OnEvent", function( self, event, ...)
  5.     function a:COMBAT_LOG_EVENT_UNFILTERED(e, timestamp, event, hideCaster, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags, ...)
  6.     if (event == "SPELL_AURA_APPLIED") and (destName == UnitName("player")) then
  7.         local spellId, spellName, spellSchool, auraType = ...;
  8.         for _,v in pairs(bloodlust) do
  9.             if v == spellId then
  10.                 print("TEST")
  11.             end
  12.         end
  13.     end
  14. end
  15. end )


EDIT:
i found a possible solution:
Lua Code:
  1. local bloodlust = { 2825, 32182, 90355, 160452, 80353, 1459, };
  2. local a = CreateFrame( "Frame" )
  3. a:RegisterEvent( "COMBAT_LOG_EVENT_UNFILTERED" )
  4. a:SetScript( "OnEvent", function( self, event, timestamp, type, hideCaster, sourceGUID, sourceName, sourceFlags, sourceFlags2, destGUID, destName, destFlags, destFlags2, ...)
  5.     if (type == "SPELL_AURA_APPLIED") and (destName == UnitName("player")) then
  6.     local spellId, spellName, spellSchool, auraType = ...;
  7.         for _,v in pairs(bloodlust) do
  8.             if v == spellId then
  9.                 print("TEST")
  10.             end
  11.         end
  12.     end
  13. end )

is this code okay?

Last edited by Endzeit : 08-19-15 at 10:21 AM.
  Reply With Quote