View Single Post
05/03/14, 10:27 AM   #5
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by gamegenius86 View Post
Actually Deadly does not always mean boss. I've ran across deadly monsters that do not have the Boss Bar.

Also how would you use IsDecoratedDisplayName() in context to your target?

Imo i would compare something(because there is no API call to get this) against the BossRank Globals. But since there is no way to get this, i have no idea >.<
OK, I have found another method:
Lua Code:
  1. for i = 1, MAX_BOSSES do  --global constant MAX_BOSSES = 6
  2.    local bossTag = "boss" .. i
  3.    if DoesUnitExist(bossTag) then
  4.       if GetUnitName("reticleover") == GetUnitName(bossTag) then
  5.          d("This unit is boss!")
  6.       end
  7.    end
  8. end

If you do not want to run this check all the time, you can use EVENT_BOSSES_CHANGED. I did not try it, but BossBar (unit frame that is displayed over the compass) is registered for this event.

Last edited by Garkin : 05/03/14 at 10:34 AM.
  Reply With Quote