Thread Tools Display Modes
10-19-05, 01:39 AM   #1
ProfOak
A Cyclonian
Join Date: Oct 2005
Posts: 47
How to know if a player is mounted?

Hi!

Is there a way or function that alows us to know if a plaeyr is mounted (on a mount) ?

Thks
  Reply With Quote
10-19-05, 03:56 AM   #2
DSanai
A Wyrmkin Dreamwalker
 
DSanai's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2005
Posts: 50
AutoBuff has a check for this. It's a bit more complex than I want to scribble here (mostly only because it has to iterate all the buffs -- check its code for how it does that).

This is the evaluation line: if ((buffline == string.lower(AUTOBUFF_MOUNT_60)) or (buffline == string.lower(AUTOBUFF_MOUNT_100))) then mounted = true; end

You'd just want to check out the iterator and the assignment of buffline to get the full picture.
__________________
Dsanai - nElf Hunter
Glacialfox - nElf Death Knight
Evilianti - Gnome Warlock
  Reply With Quote
10-19-05, 09:54 AM   #3
Gello
A Molten Giant
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 521
The reliable way is to scan the tooltips for a mount.

If you plan to check for mount status a lot, like in reaction to UNIT_AURA or some event that gets called a lot, a faster way is to check all UnitBuff("player",1-x) for "_MOUNT" (and another for kodos that escapes me). Tho unfortunately a hunter aspect has a mount icon and gives it to the whole group (the white tiger) so you'd need to double check when it encounters that icon.
  Reply With Quote
10-20-05, 03:02 AM   #4
ProfOak
A Cyclonian
Join Date: Oct 2005
Posts: 47
Working :P

Thks very much to both posters :P

I got it to work :P

Thks :P
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » How to know if a player is mounted?


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