WoWInterface - View Single Post - [Classic] zoning with RepByZone doesn't always switch watched reps
View Single Post
10-21-19, 09:21 AM   #8
A Pyroguard Emberseer
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,117
Originally Posted by Xrystal View Post
Are you sure there aren't multiple reps connected to ironforge and it simply can't decide which one to select ?
It turns out your idea wasn't that far off the mark. The reason it was working when coming from The Canals or the Military District into the Dwarven District or Tinker Town respectively before was that I was already was inside a zone and the event for a new area within a zone was firing as expected.

But coming from the Tram wasn't working because I was setting the subzone and then the zone, which was tripping me up. Your idea made me look at the code again, and voila, setting the zone handler to the subzone function (which called the zone handler anyway) did the trick. Then rearrange the code slightly to handle taxi checking and if the user turned off subzone checking, and that was it.

The only odd thing seems to be the way Blizzard is handling the tram zone. I double-checked the instanceID, found it to be correct, and the minimap does change the text, but the zoning events aren't picking up the switch, so Deeprun Tram is never set to Stormwind. I can live with that.

tl;dr answer: set the zone then the subzone.
  Reply With Quote