Thread Tools Display Modes
05-21-14, 04:20 AM   #1
Lombra
A Molten Giant
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 554
Detecting weekly reset in a good way?

Would there be any good way to determine either "it's *this* much time left until the weekly reset" or "since last time, the reset has happened"? I'm thinking, without doing things like hardcoding in the timestamp, for each region and stuff, or relying on something like being saved to an instance or having done anything at all, really. That is, I'm talking about the 0300 reset for valor, LFR, etc. (which isn't the same as regular raid lockouts)
__________________
Grab your sword and fight the Horde!
  Reply With Quote
05-21-14, 05:45 AM   #2
Nimhfree
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 267
local secondsUntilReset = GetQuestResetTime()

Though it is not valid until a little later in startup so you need to be a little careful. Of course you would need a timer to check periodically if someone were to be online over the reset period.
  Reply With Quote
05-21-14, 08:40 AM   #3
Lombra
A Molten Giant
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 554
That's only for daily reset, unfortunately.
__________________
Grab your sword and fight the Horde!
  Reply With Quote
05-21-14, 09:30 AM   #4
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 793
I imagine the best thing to do is to read the current time and date and figure out when it's wednesday and when the time is past 8 or something, since the servers go down long before 8 and are back up usually an hour or more past 8, so it would be one way of doing it.

US goes down Tuesday while EU is Wednesday. Gotta look at how the other regions behave and consider this into the calculations.

Sadly there is no API to get this information.
__________________
Profile: Curse | Wowhead
  Reply With Quote
05-21-14, 12:13 PM   #5
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
I think you might be able to check certain holidays on the in-game calendar that start/end on the reset day and use that as a reference for the current week.

Not sure how it corresponds to other regions.
  Reply With Quote
05-21-14, 01:07 PM   #6
Lombra
A Molten Giant
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 554
Don't think there are any holidays starting on maintenance day. At least not in Europe. That lead me to another discovery though! You can see every reset for every raid (not just ones you're saved to) in the calendar. Doesn't seem to be restricted by level either.

Now, is the reset at 0300 for all regions? And do the asians still have the double lockout thing? And does that reset valor cap, too?

I really don't like this kind of wonky solutions, but it's probably my best shot.
__________________
Grab your sword and fight the Horde!
  Reply With Quote
05-21-14, 01:13 PM   #7
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
Originally Posted by Lombra View Post
Now, is the reset at 0300 for all regions? And do the asians still have the double lockout thing? And does that reset valor cap, too?
I don't know, but couldn't you just use the GetQuestResetTime function mentioned earlier?

Actually, I'm pretty sure the reset time for all US time zones is 3am PDT or something, it isn't based on the server time.

Last edited by semlar : 05-21-14 at 01:16 PM.
  Reply With Quote
05-21-14, 01:20 PM   #8
Lombra
A Molten Giant
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 554
Originally Posted by semlar View Post
I don't know, but couldn't you just use the GetQuestResetTime function mentioned earlier?
Yes, probably!
__________________
Grab your sword and fight the Horde!
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Detecting weekly reset in a good way?

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