View Single Post
05-30-21, 09:53 PM   #2
DahkCeles
A Cliff Giant
 
DahkCeles's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2020
Posts: 73
https://wowpedia.fandom.com/wiki/API_C_Timer.After

Lua Code:
  1. local needTimer = true
  2. local tauntedMobs = {}
  3.  
  4. local function timesUp()
  5.     needTimer = true
  6.     -- do whatever you want with tauntedMobs
  7. end
  8.  
  9. local function onSubEvent(subevent, ...)
  10.     if subevent == "SPELL_AURA_APPLIED" then
  11.          spellId, spellName, spellSchool = select(12, ...)
  12.          if spellName == "Righteous Defense" and Tair_BattleLog_SourceIsPlayer(sourceName) then
  13.               --print("Taunted "..destName)
  14.               table.insert(tauntedMobs, destName)
  15.               if (needTimer) then
  16.                   needTimer = false
  17.                   C_Timer.After(0, timesUp)
  18.               end
  19.          end
  20.     end
  21. end


PS. I'm not sure where 'destName' comes from.

Last edited by DahkCeles : 05-30-21 at 09:56 PM.
  Reply With Quote