LibMounts-1.0

8 - Implement lib:IsMounted(unitid)

What is the enhancement in mind? How should it look and feel?

I'm an author on several buff-checking addons, including RaidBuffStatus. One common need I've noticed which is not satisfied by the Blizzard API is to query whether or not a given unit in my group is mounted. RaidBuffStatus currently includes an ad-hoc heuristic check for this which I wrote, but it's a pain to keep it updated as new mounts are added.

I suspect your library already includes the necessary data to provide this check for addons. I'm thinking an API like this:

lib:IsMounted(unitid)

Returns a mount spellid if the named unit is currently mounted, or nil otherwise. unit must be a player in the current party/raid.

The implementation is basically to iterate over UnitAura(unitid, "HELPFUL|CANCELABLE") and look for any spellIDs that match the list of known mounts.

User When Change
Adirelle Nov 02, 2013 at 09:26 UTC Changed status from New to Declined
oscarucb Apr 28, 2012 at 01:50 UTC Changed description:
  lib:IsMounted(unitid)

- Returns true if the named unit is currently mounted. unit must be a player in the current party/raid.
+ Returns a mount spellid if the named unit is currently mounted, or nil otherwise. unit must be a player in the current party/raid.
  The implementation is basically to iterate over UnitAura(unitid, "HELPFUL|CANCELABLE") and look for any spellIDs that match the list of known mounts.
oscarucb Apr 06, 2012 at 03:57 UTC Create

You must login to post a comment. Don't have an account? Register to get one!

  • 1 comment
  • Avatar of Adirelle Adirelle Nov 02, 2013 at 09:26 UTC - 0 likes

    Right now this library only have a partial mount database, since it uses the companion list of the logged in character. So this is not possible.

  • 1 comment

Facts

Last updated
Nov 02, 2013
Reported
Apr 06, 2012
Status
Declined - We decided not to take action on this ticket.
Type
Enhancement - A change which is intended to better the project in some way
Priority
Medium - Normal priority.
Votes
0

Reported by

Possible assignees