Thread Tools Display Modes
11-03-12, 11:10 AM   #1
Tonyleila
A Molten Giant
 
Tonyleila's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 758
RealAutoDismount

RealAutoDismount was a very nice addon to Auto Dismount but has problems with some MoP zones.
I already send a privat massage to DarkStarX it he won't reply.
Problems: If you fly over the black Sha zones in Kun-Lai or if you fly through (invisible yes they are there if you don't have the quest) rings in Jade forest between Arboretum and Windward Isle you will dismounted because there is a massage with "you are sitting on a mount". I don't know an easy resolve for this maybe disable addon if in this zones? I don't want to use the dont dismount if flying option because I always dismount with casting a spell
Maybe someone knows how to disable addon in this zones

local f=CreateFrame("frame");
local function eventhandler(self,event,...)
local arg = ...;
if((arg==SPELL_FAILED_NOT_MOUNTED or arg==ERR_TAXIPLAYERALREADYMOUNTED) and (GetCVarBool("autoDismountFlying")==1 or IsFlying()==nil)) then
Dismount();
end
end
f:RegisterEvent("UI_ERROR_MESSAGE");
f:SetScript("OnEvent",eventhandler);
__________________
Author of: LeilaUI and Aurora: Missing Textures
__________________
  Reply With Quote
11-03-12, 07:53 PM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Replace the contents of the addon's Lua file with this:
Code:
local ignoreZones = {
	[806] = true, -- The Jade Forest
	[809] = true, -- Kun-Lai Summit
}

local f = CreateFrame("Frame")
f:RegisterEvent("UI_ERROR_MESSAGE")
f:SetScript("OnEvent", function(self, event, message)
	if (message == SPELL_FAILED_NOT_MOUNTED or message == ERR_TAXIPLAYERALREADYMOUNTED)
	and not ignoreZones[GetCurrentMapAreaID()]
	and (GetCVarBool("autoDismountFlying") or not IsFlying())
	then
		Dismount()
	end
end)
If you want to add more zones, you can find a list of Map IDs here:
http://www.wowpedia.org/MapID
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
11-03-12, 08:41 PM   #3
Tonyleila
A Molten Giant
 
Tonyleila's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 758
Thanks Phanx! This works fine you shoud upload this as fix
Just to know: Its only possible to ignore zones with this or is there a ZoneID too?
__________________
Author of: LeilaUI and Aurora: Missing Textures
__________________
  Reply With Quote
11-04-12, 12:54 AM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
I'm not sure what you mean, as the code I posted does ignore zones...

Also, I have no interest in uploading this as a fix. I don't use the addon -- in fact, I have auto-dismount turned off in-game, and have ever since it was first introduced -- and don't have the time or interest to sign up for maintaining or supporting an addon I don't use, sorry.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
11-04-12, 01:55 AM   #5
Talyrius
An Onyxian Warder
 
Talyrius's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 363
I'm assuming that Tonyleila is referring to subzones.
  Reply With Quote
11-04-12, 04:16 AM   #6
Tonyleila
A Molten Giant
 
Tonyleila's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 758
Also, I have no interest in uploading this as a fix.
Just posted your fix in the addon comments if someone else is interested in it, its easy to find now

Originally Posted by Talyrius View Post
I'm assuming that Tonyleila is referring to subzones.
yes
__________________
Author of: LeilaUI and Aurora: Missing Textures
__________________
  Reply With Quote
11-04-12, 11:34 PM   #7
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Subzones don't have locale-independent numeric IDs, players in other locales would need to change the names to match what's shown in their language:
Code:
local ignoreZones = {
	[806] = true, -- The Jade Forest
	[809] = true, -- Kun-Lai Summit
}

local ignoreSubzones = {
	["Grookin Hill"] = true,
	["Halfhill"] = true,
}

local f = CreateFrame("Frame")
f:RegisterEvent("UI_ERROR_MESSAGE")
f:SetScript("OnEvent", function(self, event, message)
	if (message == SPELL_FAILED_NOT_MOUNTED or message == ERR_TAXIPLAYERALREADYMOUNTED)
	and not ignoreZones[GetCurrentMapAreaID()]
	and not ignoreSubzones[GetSubZoneText() or ""]
	and (GetCVarBool("autoDismountFlying") or not IsFlying())
	then
		Dismount()
	end
end)
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
11-12-12, 11:35 PM   #8
Tonyleila
A Molten Giant
 
Tonyleila's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 758
Originally Posted by Phanx View Post
Subzones don't have locale-independent numeric IDs, players in other locales would need to change the names to match what's shown in their language:
Code:
local ignoreSubzones = {
	["Grookin Hill"] = true,
	["Halfhill"] = true,
}
Woud it work if I woud just write down names of sub zones in all languages? If yes woud you mind if I upload this as a fan update?
__________________
Author of: LeilaUI and Aurora: Missing Textures
__________________

Last edited by Tonyleila : 11-12-12 at 11:44 PM.
  Reply With Quote
11-12-12, 11:43 PM   #9
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
You could always use LibBabble-SubZone-3.0.
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.
  Reply With Quote
11-13-12, 12:09 AM   #10
Tonyleila
A Molten Giant
 
Tonyleila's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 758
Originally Posted by Torhal View Post
You could always use LibBabble-SubZone-3.0.
Hmmm woud love to do that but don't know how


EDIT: wait its not working anyway tryed this but it still dismounts me when flying over one of the black zones in Kun-Lai while in "Der Yaungolvorstoß" (addon says thats the name of the subzone) i also tryed the name thats on the map "der yaungol-vorstoss". Its not dismounting me if i enable "[809] = true,"

Or did I understand something wrong? Do i have to disable zone and than tell what part of the zone?
Lua Code:
  1. local ignoreZones = {
  2.     [806] = true, -- The Jade Forest
  3.     -- [809] = true, -- Kun-Lai Summit
  4. }
  5.  
  6. local ignoreSubzones = {
  7.     -- Kun-Lai Summit
  8.     --["Basislager am Kota"] = true,
  9.     --["Einfass"] = true,
  10.     ["Der Yaungolvorstoß"] = true,
  11.     --["der Yaungol-vorstoss"] = true,
  12.    
  13.     --["Westwind Ruhestätte"] = true,  
  14.     --["Ostwind Ruhestätte"] = true,
  15.     --["Mogujia"] = true,
  16.    
  17.     -- The Jade Forest
  18.     --["Das Arboretum"] = true,
  19.     --["Windwärtsinsel"] = true,
  20.    
  21. }
  22. local f = CreateFrame("Frame")
  23. f:RegisterEvent("UI_ERROR_MESSAGE")
  24. f:SetScript("OnEvent", function(self, event, message)
  25.     if (message == SPELL_FAILED_NOT_MOUNTED or message == ERR_TAXIPLAYERALREADYMOUNTED)
  26.     and not ignoreZones[GetCurrentMapAreaID()]
  27.     and not ignoreSubzones[GetSubZoneText() or ""]
  28.     and (GetCVarBool("autoDismountFlying") or not IsFlying())
  29.     then
  30.         Dismount()
  31.     end
  32. end)
__________________
Author of: LeilaUI and Aurora: Missing Textures
__________________

Last edited by Tonyleila : 11-13-12 at 12:22 AM.
  Reply With Quote
11-13-12, 12:37 AM   #11
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Most likely, the game is dismounting you before it updates the subzone text, which means you'd either need to blacklist the whole zone, or use map coordinates instead of subzone text.

Originally Posted by Tonyleila View Post
... woud you mind if I upload this as a fan update?
You'd have to take that up with the addon's original author.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
11-13-12, 08:41 AM   #12
Tonyleila
A Molten Giant
 
Tonyleila's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 758
Originally Posted by Phanx View Post
Most likely, the game is dismounting you before it updates the subzone text, which means you'd either need to blacklist the whole zone, or use map coordinates instead of subzone text.
Why dose it need to update the subzone text i don't change zones while flying over this black sha zones. I'm using Broker: Whereabout and the subzone text was always up-to-date.

There has to be some way to make this nice addon work fine
Please help
__________________
Author of: LeilaUI and Aurora: Missing Textures
__________________

Last edited by Tonyleila : 11-13-12 at 10:33 AM.
  Reply With Quote
11-13-12, 06:27 PM   #13
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Maybe we are using different words here. Zone means the current map, eg. Kun-Lai Summit. Subzone means the current named location on the map, eg. Fire Camp Bataar, Camp Broketooth, or Tomb of Secrets.

If you want the addon to prevent auto-dismounting only in Fire Camp Bataar, for example, and not the whole Kun-Lai Summit zone, then you need to check the subzone. The "black sha zones" are also subzones, though I don't know their names offhand -- if they were zones, they would have their own map, and not be part of Kun-Lai Summit.

The problem is that while the zone text may appear to change immediately in Broker: Whereabout, the actual order of events might not be that precise. For example:

0 ms - You enter Black Sha Village.
0.0001 ms - The server realizes you entered Black Sha Village.
0.0002 ms - The server tells your client that some action occurred which requires dismounting.
0.0005 ms - Your client recieves the dismount command.
0.0006 ms - Your client dismounts you.
0.0007 ms - Your client recieves the "subzone text changed" event.
0.0008 ms - Broker: Whereabout updates its text.

While these things all appear to happen at the same time in terms of human-perceptible time, in terms of computer-perceptible time they are not all happening at the same time, and the dismounting is happening before the subzone text updating.

If this is the case then, as I already told you, your only options are:

(1) Blacklist the whole zone.

(2) Blacklist parts of the map based on coordinates, instead of checking the subzone text, since your client always has the correct coordinates for your current position and doesn't have to wait for the server to tell it that you moved.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
11-13-12, 07:37 PM   #14
Tonyleila
A Molten Giant
 
Tonyleila's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 758
Sorry Phanx we are definitely talking about two different things. When I was talking about "black sha zones" i was thinking of the black ground thats everywhere in kunlai where the Sha wordboss can spawn. For some reason this zones give the massage "Can't do that while mounted" when you fly close over them. Here are some screenshots with coords and Subzone (top right) that that black ground is in:
Subzone: Der Yaungolvorstoß: http://i.imgur.com/JVAOj.jpg
Subzone: Der Yaungolvorstoß: http://i.imgur.com/Qu8Ic.jpg
Subzone: Der Jutepfad http://i.imgur.com/Cnw89.jpg
So I don't get the dismount when changing the Subzone. I get it when flying over one of that black ground things.
__________________
Author of: LeilaUI and Aurora: Missing Textures
__________________

Last edited by Tonyleila : 11-13-12 at 07:46 PM.
  Reply With Quote
11-13-12, 11:36 PM   #15
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
If the subzone text doesn't change when you fly over a black area, then subzone filtering is not an option even if the events did fire in the right order, so again, your options are blacklisting the whole zone, or using map coordinates.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
11-14-12, 08:55 AM   #16
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,360
My local copy looks like this
Code:
local MOUNTERRORS = {
  [SPELL_FAILED_NOT_MOUNTED] = true,
  [ERR_NOT_WHILE_MOUNTED] = true,
  [ERR_ATTACK_MOUNTED] = true,
  [ERR_TAXIPLAYERALREADYMOUNTED] = true,
  [SPELL_FAILED_NOT_FLYING] = true,
  [ERR_PETBATTLE_NOT_WHILE_FLYING] = true,
}
local f=CreateFrame("frame")
f.OnEvent=function(self,event,...)
  if not MOUNTERRORS[...] then return end -- not an error message we care about, return immediately.
  if IsFlying() and not GetCVarBool("autoDismountFlying") then return end -- we are flying and don't have flight auto-dismount option checked, do nothing.
  Dismount()
end
f:RegisterEvent("UI_ERROR_MESSAGE")
f:SetScript("OnEvent",f.OnEvent)
(had submitted a patch along these lines long time ago but wasn't accepted so ... )

The issue with the sha voidzones is a bug with Blizzard and trying to apply Overcome by Anger on the player as if the player themselves are casting it.
This has a location trigger (like the auto-pickup quest functionality) but is applied as a texture debuff (same as "rested" can be applied to a map texture).

My suggestion would be to use the first version I posted and simply uncheck "Auto Dismount in Flight" from Interface Options -> Controls.

If you absolutely must keep that checked and want to suppress the dismount in this particular occasion,
this code will not win any beauty contests but will do the job.
Code:
local MOUNTERRORS,supress = {
  [SPELL_FAILED_NOT_MOUNTED] = true,
  [ERR_NOT_WHILE_MOUNTED] = true,
  [ERR_ATTACK_MOUNTED] = true,
  [ERR_TAXIPLAYERALREADYMOUNTED] = true,
  [SPELL_FAILED_NOT_FLYING] = true,
  [ERR_PETBATTLE_NOT_WHILE_FLYING] = true,
}
local f=CreateFrame("frame")
f.OnUpdate=function(self,elapsed)
  if supress then 
    supress=nil 
    f:SetScript("OnUpdate",nil) 
    return 
  end
  Dismount()
  f:SetScript("OnUpdate",nil)
end
f.OnEvent=function(self,event,...)
  if event=="UNIT_SPELLCAST_FAILED" then
    local _,_,_,_,id = ...
    if id == 129356 or id == 110668 then -- Overcome by Anger, or Fleet Winds
      supress = IsMounted() or IsFlying()
    end
  end
  if not MOUNTERRORS[...] then return end -- not an error message we care about, return immediately.
  if IsFlying() and not GetCVarBool("autoDismountFlying") then return end -- we are flying and don't have flight auto-dismount option checked, do nothing.
  if supress then supress = nil return end -- one time suppression for sha voidzones/smoke circles, and since we're not sure of the order of events do it both ways.
  f:SetScript("OnUpdate",f.OnUpdate) -- dismount on next frame
end
f:RegisterEvent("UI_ERROR_MESSAGE")
f:RegisterUnitEvent("UNIT_SPELLCAST_FAILED","player")
f:SetScript("OnEvent",f.OnEvent)

Last edited by Dridzt : 11-16-12 at 01:08 AM. Reason: added Smoke Circles
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » RealAutoDismount


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