Quantcast [Classic] zoning with RepByZone doesn't always switch watched reps - WoWInterface
Thread Tools Display Modes
10-17-19, 02:46 PM   #1
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,056
[Classic] zoning with RepByZone doesn't always switch watched reps

With build 1.0.2 of RepByZone, most of it is working finally, which is great (news everybody)! Er, sorry, wrong game version for that reference...

Anyway, zoning into and out of the Deeprun Tram does not switch the watched reputation. According to Data.lua Deeprun Tram ought to be Stormwind, and exiting into Ironforge ought to switch to Gnomeregan Exiles. Neither is true.

Walking into the tram works, as on the Stormwind side, Dwarven District is correctly flagged as Ironforge, and entering from Ironforge correctly sets Gnomeregan Exiles. But that is only entering the tram, not exiting.

What I have tried:
  • Using a delay timer of 0.5 seconds before switching reps
  • Registering for PEW and checking for both reloadUI and zoning

Neither did the trick, so I'm asking for ideas. I'm worried that zoning into an instance, raid, or battleground will also fail to switch, and have been trying to find groups to confirm or deny.
  Reply With Quote
10-17-19, 04:56 PM   #2
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,345
Are you sure there aren't multiple reps connected to ironforge and it simply can't decide which one to select ?
__________________
  Reply With Quote
10-17-19, 11:05 PM   #3
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,056
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 ?
I might agree with you if zoning into Deeprun Tram didn't work at all, because there is only one rep associated with it. Plus, as I mentioned, if you aren't in a loading screen, walking from the main city of Ironforge into Tinker Town does switch the watched faction to Gnomeregan Exiles, while on the opposite side, walking from The Canals in Stormwind into the Dwarven District also switches to watching Ironforge.

It's the loading screen that is causing the switch code to fail. However, since Deeprun Tram is being ignored, going from Ironforge sees Gnomeregan Exiles in Tinker Town, still GE in the Deeprun Tram, coming out into Dwarven District switches to Stormwind, while going the other way from The Canals in Stormwind goes Stormwind, GE in Dwarven District, ignored Deeprun Tram (should be Stormwind), Tinker Town (should be GE but gets Ironforge instead).

Maybe a longer C_Timer.After, say about 3 seconds while the load screen happens? I could try that.
  Reply With Quote
10-18-19, 04:02 AM   #4
Kanegasi
A Scalebane Royal Guard
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 409
You could try using the load screen events instead. LOADING_SCREEN_DISABLED fires when the loading screen ends and ENABLED for when it starts.
  Reply With Quote
10-18-19, 06:14 AM   #5
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,056
Whoa, I've never heard of those events before. That's cool! going to try them, thank you.
  Reply With Quote
10-19-19, 07:43 AM   #6
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,056
I tried those events, then /eventtrace to see what was going on when zoning from the cities to Deeprun Tram and back, and no appropriate event even fired, let alone PEW or LSD/LSE. /shrug. I'll test longer delays for setting the watched reputation, but for now, I can't find a solution.
  Reply With Quote
10-19-19, 12:30 PM   #7
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,345
In nUI we switch the tracked reputation based on the last received reputation update as an auto tracking feature. It might not work for areas like stormwind etc except with quest rep rewards but it might be the next best thing to what you want.
__________________
  Reply With Quote
10-21-19, 09:21 AM   #8
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,056
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
10-23-19, 01:06 PM   #9
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,345
Glad you got it sorted .. somewhat.
__________________
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » [Classic] zoning with RepByZone doesn't always switch watched reps

Thread Tools
Display Modes

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