View Single Post
04-24-18, 08:58 AM   #2
neverg
A Frostmaul Preserver
 
neverg's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2007
Posts: 268
Could you use the LUA highlight capability of the forum?
Makes the snippets way easier to read.

You have a button in the toolbar.
[ highlight="Lua" ] [ /highlight ]

Hard to debug a piece of code in isolation and you didn't say exactly what is not working.

What I can tell you is that you need to register the Threat Events against a callback in order for you to see any updates.
Like so:

Lua Code:
  1. local function UpdateThreat(self, event, unit)
  2.  -- Do stuff here
  3. end
  4.  
  5. frame:RegisterEvent("UNIT_THREAT_LIST_UPDATE", UpdateThreat)
  6. frame:RegisterEvent("UNIT_THREAT_SITUATION_UPDATE", UpdateThreat)
__________________
My oUF Layout: oUF Lumen

Last edited by neverg : 04-24-18 at 09:01 AM.
  Reply With Quote