Vault and incomplete data files

Posts from previous Beta sessions

Vault and incomplete data files

Postby boyo » Sat Dec 01, 2007 1:36 pm

I noticed the other day, I got on, and only looked at tab 1 of the vault in game, and after I uploaded the data to the site noticed that our tab 2 was gone from the site, because I hadn't viewed tab 2. So as I was thinking about this, I wondered exactly how the update was done so I started digging into it and made some changes. What I have it doing now is if the tab is in the uploaded file, it will erase just the data for that tab, then recreate it like it normally does. If the tab doesn't exist in the cp.lua it won't delete the current information from the site. Here's a diff file for the changes if you want to implement them.
Changes to /inc/update_hook.php
(1.96 KiB) Downloaded 94 times
Roster AddOn Dev
Roster AddOn Dev
Posts: 103
Joined: Wed Jan 24, 2007 7:37 am

Vault and incomplete data files

Postby tuigii » Sun Dec 02, 2007 12:59 am

Nice shot !!

I had a closer look at CharacterProfiler.lua.
We could use these ["Vault"]["log"]["money"]["time"] and ["Vault"]["log"]["money"]["time"] values.
Taken in account the last Guild (Vault) update and the actual timestamp of the current CP.lua and the time found in these two arrays, one could decide IF the Vault info is more current as the one in the Roster.

For example : last roster update : 10:00 - today
New upload : 11:15 - today
But 11:15 minus smallest(["Vault"]["log"]["money"]["time"]) (or smallest(["Vault"]["log"]["money"]["time"])) smaller or equal last update then NO Vault Update
because the guys didn't visit the Vault, or he did, but nothing changed.

Of course, the complet array ["Vault"]["log"]["money"] and ["Vault"]["log"]["money"] should be parsed, looking for the smallest ["time"] index value.

All this to decide IF we should update the Vault data base, or not.

Let's put this on a really low 'to-do' level.
User avatar
tuigii Master Master
Posts: 891
Joined: Wed Dec 27, 2006 12:57 pm
Location: Somewhere in the South Ouest of France

Return to Archived

Who is online

Users browsing this forum: No registered users and 1 guest