Thread: Pending Fixes
View Single Post
06-18-15, 02:03 AM   #35
samyonair
A Frostmaul Preserver
 
samyonair's Avatar
Join Date: May 2009
Posts: 257
Astrolabe

Hi Rythal,

I hope this will help by finding the problem


It seems astrolabe has Issues with WOD MapIds


So after an extensive amount of debugging, I have tracked down the issue that plagues Astrolabe in WoD and causes issues with the Garrison maps. The problem is exactly what Dorwido pointed out in the beginning of December: "There is an strange error, the WorldMapSize dont include data for the garrison if you do a fresh start of the client and login, if you logout a character and relogin or do a /reload it contains the data."
The root cause is a Blizzard issue. SetMapByID will NOT work for the following 18 maps:http://www.curseforge.com/paste/yf1xpwiarn2k9j4l/. It will instead end up at a different MapID when you attempt it. For some reason, 10 of those 18 maps DO actually work with SetMapByID, but only after a reload, and only if you are the same faction as the owner of the map that is being requested (so an individual character can only get 5/10 even after a reload).
I have come up with a solution for it that solves all 18 cases.
# For 8 cases, we can just do HarvestedMapData[badMapID] = HarvestedMapData[goodMapID] because it happens that there is another mapID that works that has the exact same data (same number of floors, continent, zone, coordinates). The map file name is different, but that is the only weakness, and this approach is cleaner than hardcoding (imo).
# Unfortunately, for the remainder of the cases, there is no 'good' MapID (on first reload anyway). We can solve this by hardcoding a few pieces of data (floors, continent, zone, and map file name) for 2 of the 10 maps not solved by the first solution.
# For the other 8/10 remaining cases, we can just set them equal to the two cases we hardcoded.

It is fairly ugly code, but I do not think there are many alternatives, and I commented it well to help make up for it. The new code is entirely from line 1274 to 1354 in this Astrolabe.lua
http://www.curseforge.com/paste/11773/
DIFF: http://wow.curseforge.com/paste/11886/

I hope that you will include this segment of code in your next Astrolabe release, as the issue it addresses seems to be commonly reported.
Cheers!
Source: http://wow.curseforge.com/addons/astrolabe/#c29
__________________
Carbonite Known Issuses with other Addons
Downloadlink:
http://https://github.com/mikepauer/...ive/master.zip
\___________________________________________________
Carbonite Translation Team Member; Carbonite Forum Mod
______________________________________________________________
  Reply With Quote