Map Refocus
Parkernorman26 opened this issue ยท 6 comments
I love this addon as it lets me view the enemy's attacks and let's be guess what they will potentially do. It saves me a lot of the time.
But the one feature this addon does that I cannot control is the map refocus.
Let's say I'm in Azsuna, and I'm flying north; to Val'Sharah.
I have my map open, and I'm looking at Orgrimmar.
When I fly into Val'Sharah, the map will automatically change from Durotar to Val'sharah.
Please fix this.
Yes, please work on this! It bothers me enough that I only turn pettracker on when I absolutely need it..
An option for it to not auto swap maps when crossing zones would be awesome.
I just stumbled across this and in a matter of minutes I found the code responsible on lines 45 and 46 of WorldMap.lua within directory PetTracker->Features. After removing these two lines, and testing the addon in game for less time than it took to type this, I apparently retain full functionality of PetTracker.
I would like to believe this code has a purpose relevant to PT's core functionality otherwise it just seems out of place but I haven't seen how else it's referenced so I'm presuming (unsafely) there's no repercussions to simply removing it. I haven't looked in to any other files for further detail and I won't bother unless something goes wrong.
If you implement this modification and run into an error you can return here to let me know but I probably won't look into it unless it affects me as well since I'm not fluent with this code and it would take me a long time to troubleshoot.
Code and steps below:
self:RegisterEvent('ZONE_CHANGED_NEW_AREA')
self:SetScript('OnEvent', SetMapToCurrentZone)
-Copy the .lua file for a backup if you care to
Open the .lua file in your preferred text editor (mine is Notepad++ but anything works) delete both of these lines and save the file - you'll need to repeat this if the addon gets updated and these lines persist in the new version.
That code is necessary. When the map is not open, the map stays at the last location you looked at.
Having the map in the current zone is required for the tracker to work.
What I think I can do, is prevent the zone change while the map is open.
@Jaliborc The map needs to update while it's closed for some functionality of PetTracker?
Would manually opening the map once you change zones suffice? Otherwise yes, I'd greatly appreciate an update to solve it altogether.
Ever since Blizzard allowed us to shrink the world map I've been using the map for planning ahead while on auto-move. I'd bet, with the map fade feature, many others now do as well.
That code is necessary. When the map is not open, the map stays at the last location you looked at.
It really isn't though, and it really doesn't.
You do the same thing with just PetTracker and with theses two lines disabled, and it becomes even more obvious that the tracking works just fine anyway.
If you're using this addon and don't like that functionality, just delete those two lines. It doesn't break anything and removes the annoyance.