View Single Post
01-12-18, 09:02 PM   #5
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
Originally Posted by MunkDev View Post
Register for UNIT_THREAT_LIST_UPDATE, then use UnitThreatSituation('player', unit), where unit is supplied as the first argument by the event.
Seems redundant to be scanning the combat log for something like this.
That will only work for units with a valid UnitID like your target or mouseover.

The closest you can get to tracking what you're in combat with is to monitor the combat log for every hostile interaction between your group and enemies, storing their GUID in a table, and purging units when they die or haven't been seen within a certain timeframe.
  Reply With Quote