Thread Tools Display Modes
04-14-09, 05:25 PM   #1
cawfee
An Aku'mai Servant
 
cawfee's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 30
Determining if target is a Raid boss

Heya,

I'm currently having a bit of an issue determining if a target is a Raid boss (Patchwek, Grobb etc.).

Right now I'm using:
Code:
if (UnitClassification('target') == 'elite') and (UnitLevel('target') >= 82)
... which sometimes triggers on certain trash mobs in Naxx as well, so it's not foolproof.

Now the UnitClassification value of "worldboss" only seems to work for outdoor raid encounters, not traditional raid bosses. Is there a more elegant way to solve this without listing every boss name (which would be the last-resort option)?

Thank you in advance!
  Reply With Quote
04-14-09, 05:55 PM   #2
Gandoch
A Wyrmkin Dreamwalker
 
Gandoch's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 50
I've had no issue with worldboss not working inside an instance.

Code:
if(UnitClassification("target") == "worldboss") then...
Working just fine for my oUF layout.

Also, consider the possibility of the level query returning a -1.

Last edited by Gandoch : 04-14-09 at 05:57 PM.
  Reply With Quote
04-14-09, 05:56 PM   #3
Korred
A Flamescale Wyrmkin
Join Date: Dec 2006
Posts: 101
Originally Posted by Gandoch View Post
There's a much easier way, and I assume you need it for an if statement.

Code:
if (UnitClassification("target") == "worldboss") then...
I think you can get it from there.
Not to stick my nose in where it might not belong but didn't he say that "worldboss" only works for outdoor bosses and not traditional ones?
  Reply With Quote
04-14-09, 05:58 PM   #4
cawfee
An Aku'mai Servant
 
cawfee's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 30
Thanks for the input, though I mentioned the "worldboss" thing before not triggering for the Naxxramas bosses, but apparently only for world raids such as the Dragons of Nightmare.

It might've just been a fluke; if anyone can confirm this working for instance raid bosses as well, let me know
  Reply With Quote
04-14-09, 06:07 PM   #5
Korred
A Flamescale Wyrmkin
Join Date: Dec 2006
Posts: 101
How about UnitLevel() == -1 as well as your other elite checks..

RE http://www.wowwiki.com/API_UnitLevel
  Reply With Quote
04-14-09, 06:09 PM   #6
tralkar
An Onyxian Warder
 
tralkar's Avatar
Join Date: Jan 2005
Posts: 352
just look at the hit points? when you see 200k you'll know
  Reply With Quote
04-14-09, 06:36 PM   #7
cawfee
An Aku'mai Servant
 
cawfee's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 30
Thankyou to Tralkar and Korred, I'll be using those two methods the HP check never even occurred to me, silly me. Thanks!
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Determining if target is a Raid boss


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off