Comments (11)
Prior to switching to Mounty, I had my own addon that tried to do this, and I had to settle on a zone string match to determine if Dragonriding was allowed:
function dragonridingEnabled(zone)
return zone == "Dragon Isles" and (not IsInInstance() or zone == "The Nokhud Offensive")
end
from mounty.
Hi,
thank you very much for the very detailed issue!!!
I'd like to reconstruct the issue.
Where exactly are you so GetBestMapForUnit returns 424/Pandaria instead of a map of higher level?
Your solution lacks the check of being on Dragon isles but inside of buildings, where IsInside () or IsOutside () don't seem to be fully reliable, too, as the web tells me.
But let's find a perfect way together, please.
#tlv
from mounty.
I tried to reproduce, and the map ID may be the root cause. I had tried to use Mounty magic right after using Wormhole Generator: Pandaria. One of the spots that can take you is the lake in Kun-Lai Summit at 43,84 which is where I was when I used Mounty.
Unfortunately the place is random. I tried porting again and ended up in Town-Long Steppes, but even immediately after porting the MapID was 388 (which is correct). I tried to fly to the Kun-Lai lake, but entering it from within the zone results in the expected MapID (379).
I suspect the issue may be because that particular port spot drops you off way in the air, so until you change subzones, perhaps the client only knows the continent rather than the zone. I'll try to reproduce (toy has a 4h cooldown and there are 9 possible spots, so it might take a few days), but if I can reproduce the 424 map ID immediately after getting ported to the lake, I think this is an understandable edge case and not worth addressing in Mounty for the small subset of engineers who regularly travel to Pandaria these days.
from mounty.
That's what I thought. Also happened every time, when ported back to Oribos. Before touching ground, it was flyable for a split second. ^^
from mounty.
But now I also implemented a continent check, so if not on Dragon Isles, Mounty won't summon dragons at all. Coming soon.
Hopefully they won't allow dragon riding on other continents soon. ^^
from mounty.
Ahhh, maybe I switch from ADDON_LOADED to PLAYER_ENTERING_WORLD. Worth a try.
from mounty.
On the right track. When porting to Oribos and spamming C_Map.GetBestMapForUnit("player") this happens:
[09:52] Mounty #TLV v2.7.0.4: map id: 1550.
[09:52] Channel gewechselt: [1. Allgemein - Oribos]
[09:52] Channel gewechselt: [3. LokaleVerteidigung - Oribos]
[09:52] Mounty #TLV v2.7.0.4: map id: 1670.
from mounty.
This is how I fixed it: Before starting the magic process I let Mounty check first, if the player is in a true zone. This work's well, having been tested by using portals between Stormwind and Oribos.
function TLVlib:IsInTrueZone()
local mapID = C_Map.GetBestMapForUnit("player")
if (mapID) then
local info = C_Map.GetMapInfo(mapID)
if (info) then
return info['mapType'] > 2
end
end
return false
end
from mounty.
Thanks for your input. Helped a lot!
#tlv
from mounty.
I was able to reproduce the MapID issue with the lake. Interestingly if you log out in the middle of the lake and then log back in, you'll get mapID 424 consistently until you swim about ~10y from the center point, at which point you start getting mapID 379.
Thanks for the quick response and fix to the addon.
from mounty.
yw!
#tlv
from mounty.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mounty.