Thread Tools Display Modes
12-16-18, 12:55 PM   #1
LudiusMaximus
A Rage Talon Dragon Guard
 
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 320
Checking for "Ground mounts are not allowed here"?

I just realised that when moving close to "Great-father Winter" you get dismounted automatically and trying to mount again brings up "Ground mounts are not allowed here".

Is there any way of checking if the player is in such an area? I mean like IsIndoors() but for these kinds of other areas in which you cannot be mounted?

Thanks!
  Reply With Quote
12-16-18, 04:17 PM   #2
JDoubleU00
A Firelord
 
JDoubleU00's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 463
I'm not sure how to check, but I remember several expansions ago Blizz implemented an area around quest givers that dismounts you. This was to prevent griefers from sitting on their large mounts and making it difficult for you to see the mob. Maybe the NPC has a buff?
__________________
Author of JWExpBar and JWRepBar.
  Reply With Quote
12-16-18, 04:39 PM   #3
LudiusMaximus
A Rage Talon Dragon Guard
 
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 320
Hm, isn't there any way of knowing if mounting is possible in an area?

I guess it must be possible somehow, because the mount icons in the action bars become inactive whenever in such an area.

Any idea how the action bar UI is doing this trick?
  Reply With Quote
12-16-18, 05:37 PM   #4
LudiusMaximus
A Rage Talon Dragon Guard
 
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 320
I am now doing it with this workaround of storing the last active mount id of each character in a variable lastActiveMount:

Code:
local _, _, _, _, lastActiveMountUsable = C_MountJournal.GetMountInfoByID(self.db.char.lastActiveMount)
if (not lastActiveMountUsable) then
  print("You cannot mount here!")
end
This works for me, as my code is only invoked by PLAYER_MOUNT_DISPLAY_CHANGED with IsMounted()==false.
  Reply With Quote
12-29-18, 11:31 AM   #5
Nightness
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Feb 2009
Posts: 32
Zone

Keep using isUsable from C_MountJournal.GetMountInfoByID, and create a pseudo-event that triggers off of the "ZONE_CHANGED", "ZONE_CHANGED_NEW_AREA", and the "ZONE_CHANGED_INDOORS" events; trigger when isUsable has changed values.

Last edited by Nightness : 12-29-18 at 11:39 AM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Checking for "Ground mounts are not allowed here"?

Thread Tools
Display Modes

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