WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   [Classic] zoning with RepByZone doesn't always switch watched reps (https://www.wowinterface.com/forums/showthread.php?t=57612)

myrroddin 10-17-19 02:46 PM

[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.

Xrystal 10-17-19 04:56 PM

Are you sure there aren't multiple reps connected to ironforge and it simply can't decide which one to select ?

myrroddin 10-17-19 11:05 PM

Quote:

Originally Posted by Xrystal (Post 334298)
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. :confused:

Kanegasi 10-18-19 04:02 AM

You could try using the load screen events instead. LOADING_SCREEN_DISABLED fires when the loading screen ends and ENABLED for when it starts.

myrroddin 10-18-19 06:14 AM

Whoa, I've never heard of those events before. That's cool! going to try them, thank you.

myrroddin 10-19-19 07:43 AM

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.

Xrystal 10-19-19 12:30 PM

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.

myrroddin 10-21-19 09:21 AM

Quote:

Originally Posted by Xrystal (Post 334298)
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.

Xrystal 10-23-19 01:06 PM

Glad you got it sorted .. somewhat. :)


All times are GMT -6. The time now is 02:33 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI