Get an Epic Experience with Premium

MountMap

Action Bars Login to Add Favorites
  • 0 Likes
  • Runes of Magic
  • 26 Monthly Downloads
  • Supports: 4.0.2.2440
  • 4,364 Total Downloads
  • Updated 06/01/2012
  • Created 02/05/2010
  • 3 Favorites
  • Project Site
  • Comments
  • Release Type: Release
  • License: All Rights Reserved
  • Newest File: v1.0
or
Support development! **
Donate

About MountMap

Please submit bug reports and change requests through the ticketing system on this addon's Curse project page.

This add-on manages automatically displaying and hiding the small area map when riding a mount.

The area map is normally toggled with the shift+M hotkey combination. Upon completion of casting a mount, the map will display. Dismounting will hide the map if it was originally automatically displayed by the add-on.

If you manually display the map by using the shift+M combo, the add-on will not automatically hide it - you must hide it with the hotkey as you normally would.

As an added bonus, this add-on also fixes a client bug where displaying the map doesn't retain the player's transparency setting.

If the map is not triggered by your mount, please leave a comment and I will contact you.

------------------------------------------------------------------------
r4 | shifuimam | 2012-06-02 00:55:44 +0000 (Sat, 02 Jun 2012) | 1 line
Changed paths:
   A /tags/v1.0 (from /trunk:3)

tagging as release
------------------------------------------------------------------------
r3 | shifuimam | 2012-06-02 00:54:49 +0000 (Sat, 02 Jun 2012) | 2 lines
Changed paths:
   M /trunk/MountMap.lua
   M /trunk/MountMap.xml

features:
- registered with AddonManager
------------------------------------------------------------------------
r2 | shifuimam | 2012-05-18 04:00:50 +0000 (Fri, 18 May 2012) | 1 line
Changed paths:
   A /trunk/MountMap.lua
   A /trunk/MountMap.toc
   A /trunk/MountMap.xml

initial commit
------------------------------------------------------------------------
r1 | svn | 2012-05-18 03:16:23 +0000 (Fri, 18 May 2012) | 1 line
Changed paths:
   A /branches
   A /tags
   A /trunk

mountmap/mainline: Initial Import
------------------------------------------------------------------------

Comments

  • #1
    @The map does not auto-hide after dismounting; there is no easy way (or any way at all, really) to accomplish this.

    Simply listen to UNIT_BUFF_CHANGED event.
    If you find a "Horse" within the buffs, you toggle mini-worldmap on. If not you toggle it off. Make sure to set a variables that will check if it was toggle by your script or not. Else it will always close the mini-worldmap when the user buffs/debuffs changes.

    UNIT_BUFF_CHANGED event will surely end more economic than CASTING_STOP on a caster class.

    Cheers for your idea, I like to have my mini-worldmap opened when I travel. (Still I manually open it ^^')
  • #2
    Thanks for the tip. I tried UNIT_BUFF_CHANGED, but there doesn't seem to be a way to determine *which* buff is added or removed when the event fires. If you know anything about that, do let me know - I'll be more than happy to update the addon.
  • #3
    As ROM doesn't give much tools with their events, you have access to the player's buffs through UnitBuff('player', X) where X is a number from 1 to amount of buffs.

    Cycle all buffs to find out if there's a mount one.
    Make sure to remember that all mounts are not called horses and it is also language based.

    Good luck.
  • #4
    Thanks for the tips! I did manage to make it work, and now the map auto-hides upon dismounting if it was auto-displayed to begin with. This means that you can show the map normally (via Shift+M), and it will not hide/display automatically unless you manually hide it first.

    The qualifier for whether it's a mount or not is based on GetPlayerBuffTexture(), which unless I'm mistaken should be language-independent since it's part of the game database files.
  • #5
    100% true mate, didn't think about the Texture :)
    Glad you made it work! This will be very useful to those that travel a lot.
  • To post a comment, please login or register a new account.
Login to Curse

Don't have an account? Create One.

Get an epic experience with Curse Premium
  • Faster addon downloads
  • Premium-Only Beta Giveaways
  • Ad-Free Curse experience
  • Premium Curse Client
  • and many More Features
  • Learn More »

Maingear

ENTER NOW