WoW:API UnitLevel: Difference between revisions
Jump to navigation
Jump to search
(Not anymore. (See the changes if you want to know what it is)) |
|||
| Line 8: | Line 8: | ||
== Details == | == Details == | ||
: Note that the value returned by <tt>UnitLevel("player")</tt> will most likely be incorrect when called in a [[Events_P_(Party,_Petition,_Pet,_PlayerBank,_Player)#PLAYER_LEVEL_UP|PLAYER_LEVEL_UP]] event handler, or shortly after leveling in general. Check [[Events_P_(Party,_Petition,_Pet,_PlayerBank,_Player)#PLAYER_LEVEL_UP|PLAYER_LEVEL_UP]] arg1 for the correct level. | : Note that the value returned by <tt>UnitLevel("player")</tt> will most likely be incorrect when called in a [[Events_P_(Party,_Petition,_Pet,_PlayerBank,_Player)#PLAYER_LEVEL_UP|PLAYER_LEVEL_UP]] event handler, or shortly after leveling in general. Check [[Events_P_(Party,_Petition,_Pet,_PlayerBank,_Player)#PLAYER_LEVEL_UP|PLAYER_LEVEL_UP]] arg1 for the correct level. | ||
Revision as of 16:01, 15 January 2008
Returns the unit's level.
/script SendChatMessage("Level "..UnitLevel("target"));
If the current target is a Level 50 mob, this macro will print Level 50 in your chat window. If the unit's level is unknown, i.e. a Level ?? target, or is a special boss, UnitLevel() will return -1.
Details
- Note that the value returned by UnitLevel("player") will most likely be incorrect when called in a PLAYER_LEVEL_UP event handler, or shortly after leveling in general. Check PLAYER_LEVEL_UP arg1 for the correct level.