View Single Post
11-23-11, 02:36 AM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Have you looked at the code of any boss mods? All of the major ones (BigWigs, DBM, DXE, etc.) have generic boss detection. The basic idea is that when you enter combat, you check not only your target, but the targets of all party/raid members, and if any hostile worldboss-classified units are also in combat, then you have engaged a raid boss.

Also, I'm fairly sure you could use the INSTANCE_ENCOUNTER_ENGAGE_UNIT event. The default UI uses this event to show (or hide) boss frames, so when it fires, just check the boss1/2/3/4 unitIDs for worldbosses in combat.
  Reply With Quote