View Single Post
01-14-23, 06:20 AM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
NAME_PLATE_UNIT_ADDED fires with a UnitID for what the nameplate is attached to. You can add a check on that by adding the highlighted lines to this code block.

Code:
if event == "NAME_PLATE_UNIT_ADDED" then
	local np = select(1, ...)
	if UnitIsEnemy("player", np) then
		return aura_env.track_plate(allstates, np)
	end
end
Note: The return is safe to skip as the code exits soon after anyway when it checks if it's a CLEU event.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 01-14-23 at 06:23 AM.
  Reply With Quote